Browsers cache data whenever you load a page. In general, this is a good thing—you’ll save data transfer (very important on mobile), and increase speed on any connection if the browser can use data that it’s already cached.
But there’s one place I hate browser cache: When creating or editing web pages. I’ll edit a file, save the changes, upload the new file, load the page…and nothing. So I edit again, repeat, still nothing. Only then do I remember the cache. Argh!
Thankfully, there are ways around (most) cache issues. I do most of my web development in Chrome and Safari; here are the simple tips I use to manage cache in those browsers when developing.
Enable the Developer menu (Prefs > Advanced > Show Develop menu in menu bar).
Once enabled, use the Developer menu to easily empty the cache via the Empty Caches menu item, which is bound to the keyboard via ⌘⌥E.
Also in the Developer menu, you can completely disable the cache with the Disable Caches menu item. This is what I do when developing—just remember to enable them again when you’re done, or you’ll find browsing quite slow.
To force a single page to completely reload, hold down the Option key and click on the reload icon in the URL bar.
When I posted my 787 takeoffs and landings video, I ran into a weird problem: When embedded here, the video would play in Safari at 4K (2160p), but when viewed on YouTube, the max resolution available was 1440p. After failing with web searches, I asked Twitter about it…
…but didn’t hear anything back. I pretty much gave up on the issue until today, when I stumbled across this article, which describes the exact problem I’m having. The summary of the article describes both the problem and the apparent cause:
What appears to be Google’s shift to the VP9 codec for delivering 4K video on the YouTube homepage is preventing Safari users from watching videos uploaded to the service since early December in full 4K resolution, but not from viewing webpage-embedded videos in the same resolution.
Bingo! Google seems to now be using the open and royalty-free VP9 codec for 4K videos viewed on its YouTube site, but reverts to the H264 codec when those same videos are embedded on other sites.
Note that this issue only affects videos uploaded after December 6, 2016:
Videos uploaded to the service prior to Dec. 6 in 4K resolution can still play back in full 4K resolution on Safari from the YouTube homepage.
I was curious about which macOS browsers this issue affects, so I thought I’d do a little experiment…