Caches are annoying
Saturday May 13, 2006
Yes, I know, I know, when you have a cache the page will load more quickly than without one. But they're annoying for testing, and for building things like Ajax applications which rely on the same URL without refreshing the page. Caches are especially annoying when you don't know about them. You make a change to your page, upload it, check it, and your change doesn't take effect. So you make more changes, upload them, test, and still not there... I have actually done this 4 or 5 times before realizing that the cache was blocking me from seeing what I'd changed. grrrrrr


Comments
meta http-equiv=”expires” doesn’t always work very well for AJAX or Flash. Another option is to make the URL’s dynamic. In Flash’ actionscript you just add something like this to the URL:
Of course you don’t use the Foo GET variable, but the browser thinks it’s a different URL every time it opens it.
With AJAX you can better use the POST method to refresh content instead of GET. That will solve most of the caching problems in IE (other browsers don’t have that caching problem anyway).
Control + F5 (windows only) will do the same as Shift + Refresh for those who prefer the keyboard.
The worst part is, some ISP’s have their own cache, which you can’t refresh. I’ve noted many dial-up connections with a “web accelerator” keep a cache that refreshes once per week, to speed up your browsing and can’t be renewed on your PC (mainly AOL is a pain).
The worst part is, some ISP’s have their own cache, which you can’t refresh.
Yes, that’s really annoying. Most people who are just browsing the Web don’t usually mind this, but for Web developers it can be brutal.