Solved

Internet Explorer -- prevent css file cache

Posted on 2013-05-20
4
134 Views
Last Modified: 2015-05-21
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
0
Comment
Question by:finance_teacher
4 Comments
 
LVL 9

Accepted Solution

by:
joshbula earned 500 total points
ID: 39181484
Usually you can double-click the "Refresh" button a few times and it will re-load the css file.  You don't want to completely prevent caching because that's one of the reasons using a css file is more efficient than inline styles.
0
 

Author Comment

by:finance_teacher
ID: 39191916
Any other solution to this CSS "version=x" issue ?
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 40790594
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Web site error 3 41
Media.Imaging 1 18
Help with preventing downloading a zip file 10 37
Help with adding DLL file in Windows project 20 32
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question