0

I have looked into this time and again and have read solutions but they simply do not work.

Supposedly, one can bypass the cache in Chrome by hitting F12, clicking the gear in the bottom-right corner, and checking "Disable cache." This does not work for me. I still get a page with cached CSS. In Firefox, I go under Net and check "Disable Browser Cache" to no avail. HTML is not an issue, just the CSS and, possibly, JS.

IE, however, doesn't have this problem. I update the page's CSS and IE updates accordingly. For obvious reasons this is not an ideal situation.

I go to my-site.com/style.css in Chrome and Firefox and the file there is not the file I see with FTP/SSH/IE. If this looks like a bug (it does to me), then please let me know. If I'm just being dumb, then please tell me what I am missing. Please.

Thank you.

1
  • This isn't a programming question. Commented Dec 8, 2011 at 8:56

1 Answer 1

4

One way to avoid caching is to explicitly change the url in someway. What I would suggest is to append a querystring parameter to the css url like:

http://mysite.com/content/css/File.css?version=1234

and update the version or another way is to attach the DateTimeOffset instead of an auto incremented number.

Sign up to request clarification or add additional context in comments.

1 Comment

That's a neat trick! This makes sense and I thank you. Is there no method within either browser to disable the cache for a single site?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.