CODING WITH ANDRZEJ

Invalidating the browser cache

I had a bit of an issue with my website recently.

I pushed some changes incorporating images for the first time (I know – very swish, very modern), and everything seemed to be working just fine, but when I loaded the production site in Firefox… the images were not styled. Stranger still, they were styled when I loaded the same page in Chrome.

The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’re right, it is obviously a cache problem. Pressing CTR + SHIFT + R (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the immediate problem for me, on my machine. But what about other people’s machines? I needed to cache-bust.

Read more...