joshcomley
joshcomley

Reputation: 28818

Is there a way to tell browsers to ignore cache from before a certain date?

I have an updated stylesheet that I cannot rename or insert any ?nocahce=blah sort of thing - but browsers are still using a cached version.

Can I put a meta tag in (or something like that) that effectively cancels any cache from a certain date?

Upvotes: 3

Views: 298

Answers (2)

Johann Strydom
Johann Strydom

Reputation: 1492

I've had some situations where a client had a very stubborn proxy server on their network that refused to give you a newer version of the file. We ended up having to rename the css and js files for every release :(

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328614

When you update the file on the web server, the last modification time of it should change. You can verify this by sending a GET or HEAD request (use a command line tool like wget, curl or something like FireBug to verify).

When the date changes, the browsers should update their caches (unless your browser has a bug).

Upvotes: 1

Related Questions