I pass an version number to the url so that I can force new loads of the js and CSS, like this:
<script src="/script/portal.js?v=<%=ScriptVersion%>" type="text/javascript"></script>
<link href="/css/portal.css?v=<%=ScriptVersion%>" rel="stylesheet" type="text/css" media="screen" /> <!-- does not work -->
Somehow ASP.NET parse the <link> tag and create this ugly code:
<link href="/css/portal.css?v=<%=ScriptVersion%>" rel="stylesheet" type="text/css" media="screen" /> <!-- does not work -->
The only solution for this was to include CSS like this;
<style type="text/css" media="screen">
@import "/css/portal.css?v=<%=ScriptVersion%>";
</style>
JavaScript includes works perfect, it's just the css links that is parsed :/
No comments:
Post a Comment