Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

app_themes css files and version number

I would like to be able to have a version number appended to a css file located in my app_themes folder in my asp.net website so that modification to the file would force the browser to get the file from the server instead of using the one in the cache.

the css output path would look like ~/app_themes/blue/blue.css?v=1234

Any idea how it can be done without having to manually edit the filename?

like image 652
ak3nat0n Avatar asked Mar 21 '09 21:03

ak3nat0n


2 Answers

A more detailed solution is available here:
Add url parameter to css file in asp themes folder

like image 130
Nariman Avatar answered Oct 24 '22 05:10

Nariman


I'd try something like this

<link 
  rel="stylesheet" 
  href="/app_themes/blue/blue.css?v=<%=Global.VERSION_NUM%>"> 

Do that to all your CSS references, then when you make a deployment to your live site, you can just change the constant VERSION_NUM

like image 22
Clyde Avatar answered Oct 24 '22 04:10

Clyde