Question

Using the browser cache offers the big advantage of saving a lot of traffic and making your site faster. However, the big disadvantage is that cached resources cannot be "uncached", until they expire and the browser requests the resources again. Or can they?

Is there a way to explicitly tell the browser (in a seperate request or JavaScript, etc.) to uncache a certain resource?

I know of appending version strings like image.jpg?12342, but I'm looking for a more elegant alternative. E-Tags are a cool thing, but they don't really cache. We may save sending the actual resource payload, but the browser still does a request.

Was it helpful?

Solution

You might want to check out a cache manifest especially if you don't have access to the server.

Yes it is primarily used to "cache" files for using web apps offline however, you can also expliticly declare certain URI's to be non-cached and even versioning your cache manifest will trigger a reload of noted URI's.

CACHE MANIFEST
# Version x 

NETWORK:
uri-path.here

http://html5doctor.com/go-offline-with-application-cache/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top