Google has today announced that a new feature called reactive prefetch has been rolled out to mobile search, making searches somewhere in the realm of 100 to 150 milliseconds faster—a notable improvement if you’re on a fast enough internet connection. Sadly, the feature is limited to those using the Chrome app for Android at the current time because, according to Ilya Grigorik, “it is the only browser that supports (a) dynamically inserted prefetch hints, and (b) reliably allows prefetch requests to persist across navigations.”
This is a powerful pattern and one that you can use to accelerate your site as well. The key insight is that we are not speculatively prefetching resources and do not incur unnecessary downloads. Instead, we wait for the user to click the link and tell us exactly where they are headed, and once we know that, we tell the browser which other resources it should fetch in parallel – aka, reactive prefetch!
How does the feature work? Unlike other prefetch methods, reactive prefetch will wait for the user to click a link so that Google knows exactly where they intend to go, at which point the search engine will tell the browser to fetch certain parts of the page in parallel—namely, resources that Google has determined are likely to slow page load times. This is possible due to Google search crawlers getting an idea, for every page on the web, what parts should be “hinted” at to prefetch reactively.
You may or may not notice the improvement, but it’s rolling out to mobile search for Chrome on Android today.