What's prefetching, and why do we use it?

Prefetching allows Facebook to download mobile content in advance. For example, let's say you've created a mobile ad that includes a link or call to action to your mobile website. When someone clicks the link or call to action on your ad, a portion of the content it's linked to may already have been prefetched and will appear more quickly.

Facebook prefetches a portion of both organic and ad content. Prefetching is beneficial for people using Facebook on slow or poor network connections. For people on Facebook, prefetching loads mobile site content faster, which improves the Facebook app experience on Android and iPhone devices.

For advertisers, prefetching has a number of benefits, including:

  • Decreasing an advertiser's mobile site load time, which may improve their ad performance and engagement.
  • Decreasing the drop off that occurs between someone clicking on an ad and an advertiser's mobile site fully loading.


How prefetching works:

For each News Feed mobile ad, Facebook attempts to predict how likely a person is to click on an ad. If the prediction score meets the requirements, we prefetch the initial HTML page when the story first appears on a person's screen. This content is cached locally on the person's device for a short amount of time. If the person clicks on the ad, Facebook loads the initial page from the cache. The initial page then makes regular web requests to the publisher's server to load the remainder of the page. We currently only cache the initial HTML page. Keep in mind that the CSS, Javascript or images on the website are not cached.