Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Internet Explorer -- prevent css file cache

Posted on 2013-05-20
4
Medium Priority
?
147 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

926 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