Solved

Internet Explorer -- prevent css file cache

Posted on 2013-05-20
4
129 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now