Pre-fetching links to improve performance

I was stumbling around the web the other day when I came across Addy Osmani’s website (he’s an Engineering Manager at Google working on Chrome) and I was looking at the open source projects he’s worked on.  One in particular stood out for me; Quicklink.

The idea is pretty simple, but also very elegant.  This library waits until the browser is idle, checks that the user isn’t on a slow connection or currently using data saver, and then pre-fetches all of the links currently visible on the screen.  What this means is that pages that the users might click on are pre-fetched into the local cache, so when they click on the link, it will load lightening fast.

I thought this would be an excellent idea for a WordPress plugin, but then I discovered that it already existed; Quicklink for WordPress.

The downside of this approach is that your analytics might be a bit skewed, with loads of page views logged when pages aren’t actually viewed, just fetched.  And you are using up more of the user’s bandwidth than you really need to.  But I liked the idea and it led me to wonder if it would be better to just pre-fetch links that they show interest in, by hovering over…

And then I discovered that exists as well; instant.page, and there’s an official WordPress plugin for that too; instant.page plugin.  This “just in time loading” mechanism claims to give ~300ms on a desktop (or any device using a mouse) and ~90ms on a mobile (or other touch screen device), which provides a noticeable improvement if your page is already loading quickly, but not so much if it’s taking several seconds anyway.

So I ended up having no new ideas at all, unfortunately, but found two really useful looking WordPress plugins to try out in earnest.