Link to home
Start Free TrialLog in
Avatar of finance_teacher
finance_teacher

asked on

Internet Explorer -- prevent css file cache

I need to prevent Internet Explorer css file cache.

How can I fix the below \App_Start\BundleConfig.cs or another file to include “?version=1” or something ?

Steps
1.      Create new ASP.net MVC 4 C# APP
2.      Open \Content\Site.css
•      Change H2 font size
3.      Run app
•      Font change appears
4.      Change H2 font size again
5.      Run app again
•      Font change does not appear
6.      Open \Views\Shared\_Layout.cshtml
•      Add below inside <head> after other CSS statements
•      link href="@Url.Content("/Content/Site.css? version=1")" rel="stylesheet" type="text/css" />
7.      Run app again
•      Font change appears correctly
ASKER CERTIFIED SOLUTION
Avatar of joshbula
joshbula

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of finance_teacher
finance_teacher

ASKER

Any other solution to this CSS "version=x" issue ?
Avatar of Amandeep Singh Bhullar
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.