Matt Wilcox

Web Development

Notes Jun 21st 2016

Why I probably won't use Resource Hints' pre-fetch and pre-load directives

The biggest trend and problem of the last few years is ever bigger web pages wasting ever more bandwidth. And we're given tools to load more crap based on a guess as to what the user might want to do next?

This seems fairly simple to me. One side of web development wants nothing but speed. A faster loading page gets you higher SEO, better user retention, more conversions, higher sales, more eyeballs on pages, and interacting with your content for longer. Taken to its logical extreme we'd just load the minimum resources for the initial page view and then funnel the entire website in the background. It's a totally legitimate strategy toward that goal of speed. It's also ridiculous in today's era of limited, patchy, and expensive data plans. And, given that the average bounce-rate for most websites sits around the 50% bracket; you're guarenteed to have wasted half of your visitors data plans for no gain at all.

The biggest topic in web development for the last few years has been how huge web pages are becoming and we've gone to great lengths to offer ways of addressing that - look at Picture as a prime example. And yet, with Resource Hints, we're given a tool that seems even worse than just loading big images you don't need. We guess at what the user may want to do in the future and load swaths of content just in case?

Seems to me, if you build a light weight page in the first place, you don't need to bother with this kind of strategy that will heavily penalise people on pricey connectivity. And given that, as far as I'm aware, there's no ability for the User Agent to opt out of pre-fetch etc, that removes control from the user and leaves them holding the bill for pointless data.

I'm not a fan.