Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Design Doc: Automatic Prerendering

Jeff Kaufman edited this page Jan 5, 2017 · 1 revision

Automatic Prerendering

Jason Hoch, August 2011

Overview

Google recently released Instant Pages (http://googlewebmastercentral.blogspot.com/2011/06/announcing-instant-pages.html), which uses Chrome's new pre-rendering technology to serve search results to users instantly in the event that a user clicks on a top result with high "naviness," a measure of the probability that a user will click on a result after searching a given word or phrase. mod_pagespeed would love to incorporate this technology, as well as more basic HTML or resource pre-fetching, into the pages of its subscribing webmasters. This idea is taking off as an intern project in Summer 2011.

The first step of this project is to collect feasibility data from live pages; it is possible that links with high naviness exist only in special environments such as Google search results. Since pre-rendering has an associated user and server bandwidth cost, it should not be used loosely.

If it is found that pre-rendering can be useful in the wild, the thresholds at which <link rel="prefetch"> tags would be inserted need to be set, in the best case by a combination of webmaster setting and machine learning on the server, in the worst case hard-coded by mod_pagespeed. Possible inputs for machine learning include aggregate click-through data and recent click-through data, both for URLs and page locations.

Progress/Development

The collection of feasibility data has proved difficult because of some limitations of Apache. So far some crucial building blocks have been put in place:

  • Logging of page and resource referrers
  • Addition of position-in-page data to URLs
  • Persistent storage of referrer data in shared memory.
  • Referer statistics interface that utilizes shared memory data structure
  • Inject-prefetch-directive filter that checks accumulated statistics against 70% threshold
Clone this wiki locally