I found these two Firefox extensions are amazingly useful for clearing up site development problems caused by server files being cached by the browser.

These are great for those incredibly frustrating situations where you repeatedly edit a file on the server, but it appears to have no effect, because (you eventually realize) your browser is still using the old cached version that it fetched 20 minutes ago.... in my experience this seems to happen quite often with css, js and xml files

CacheViewer (view and delete individual browser cache files)
https://addons.mozilla.org/en-US/firefox/addon/2489

Johnnycache (stop the browser from fetching certain files from the cache)
https://addons.mozilla.org/en-US/firefox/addon/3817

Use Cacheviewer to delete individual files from the browser cache (delete them one at a time because the multiple select and delete doesn't work). This is foolproof, because if the file isn't in the cache any more, you can be certain the browser will be forced to get the new version from the server.

Cacheviewer is also useful for a general understanding of WTF is going on, such as finding out which files the client is downloading, when they were last grabbed and precisely which path they're coming from. (although other Firefox addons, like FireBug, can help here as well).

In theory, Johnnycache can prevent cache access for individual files or paths - which would be perfection. In practice, this doesn't work in some cases (maybe I'm giving it the wrong path somehow).

You can use Johnnycache to block caching for the entire site under development (just use yoursitename.com). This always works, but it can slow down loading of complex pages. But I'd suggest doing this when you first install Johnnycache, to get an idea how it works.

The only caching problem these addons won't protect you from is your ISP's badly-configured proxy invisibly caching the files.

Comments

gpk’s picture

Useful stuff!

Suggest you add it to the handbook ... maybe here http://drupal.org/node/201873 (hit the "Add child page" link)

gpk
----
www.alexoria.co.uk

bsimon’s picture

Thanks, good idea - I added it at http://drupal.org/node/330476

gpk’s picture

:)

gpk
----
www.alexoria.co.uk