Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Latest commit

 

History

History
33 lines (23 loc) · 2.22 KB

File metadata and controls

33 lines (23 loc) · 2.22 KB
layout title description date updated hero alt authors
layouts/blog-post.njk
Exploring a back/forward cache for Chrome
bfcache creates a cache allowing for instant navigations to previously-visited pages.
2017-09-13
2021-05-25
image/C47gYyWYVMMhDmtYSLOWazuyePF2/JUvwOe6kvoE8Ut1Vh2Jg.png
Laptop and mobile phone
addyosmani

On the Chrome team, we are exploring a new back/forward cache to cache pages in-memory (preserving JavaScript & DOM state) when the user navigates away. This is definitely not a trivial endeavor but if it succeeds it will make navigating back and forth very fast.

A back/forward cache (bfcache) caches whole pages (including the JavaScript heap) when navigating away from a page, so that the full state of the page can be restored when the user navigates back. Think of it as pausing a page when you leave it and playing it when you return.

Below is a first-look of an early prototype of back/forward cache in action on desktop:

{% YouTube id="eusKoHPAWtU" %}

We also have a preview of the back/forward cache working on Chrome for Android:

{% YouTube id="cuPsdRckkF0" %}

We estimate this change could improve performance up to 19% of all navigations for mobile Chrome. You can find more detail about this feature in the bfcache explainer.

There is medium cross-browser interop risk with this change. Both Firefox and Safari already have back-forward cache implementations that are subtly different. Chrome is opting not to use WebKit’s implementation of bfcache due to incompatibility with Chrome’s multiprocess architecture.

Our formal intent-to-implement for the back-forward cache is on blink-dev for anyone wishing to contribute to the discussions.

Thanks to Arthur Sonzogni, Alexander Timin, Kenji Baheux and Sami for their help putting together our prototype videos.