Back/Forward Cache

The Back/Forward Cache (bfcache) is a browser optimisation that stores a complete in-memory snapshot of a page — including its JavaScript heap and DOM state — when a user navigates away, so that pressing the browser back or forward button restores the page instantly without any network requests or re-execution of JavaScript. Chrome, Firefox, and Safari all implement bfcache. Because restored pages are not reloaded, they do not generate new navigation-based Core Web Vitals measurements, which is beneficial for field data. However, certain page behaviours prevent bfcache eligibility, including use of unload event listeners, open IndexedDB connections left without proper cleanup, use of Cache-Control: no-store headers, and certain use of SharedArrayBuffer. Google’s DevTools has a dedicated bfcache testing tool that identifies the specific reasons a page is not eligible. Ensuring pages are bfcache-eligible is considered a performance best practice and is included in Lighthouse audits as of 2022.