Solved

Internet Explorer -- prevent css file cache

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Resolve Dependency Issues 4 47
scanning dentists xray (the small ones) 3 45
ASP.net Javascript use multiple sliders 2 19
Video Player 2017 5 14
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…
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.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

12 Experts available now in Live!

Get 1:1 Help Now