CSS
-
More cache-busting
Well, that was easy.
At the end of my last post, I had successfully written a script to stop stale CSS from getting stuck in the browser cache. It was a rough-and-ready solution — mine usually are — but it did the job. The one optimization I wanted to make was to ensure that the cache gets busted only when there is fresh CSS, as opposed to on every build. I had expected to get a nice long blog post out of this, but it turns out to be a very easy job.
Read more... -
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
Read more...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.