Back/forward cache (bfcache): why the Back button can be instant, and what blocks it
Understand bfcache restores, common blockers and the privacy, analytics and freshness checks a restored page needs.
When someone taps Back, some pages reappear instantly and some reload from scratch. The difference is often the back/forward cache, or bfcache. This article summarises web.dev's guide to it, as read on 15 November 2026 (the page says it was last updated 16 October 2026). It matters for page speed, for how pageviews and Core Web Vitals are counted, and for what stale or private data a restored page may show. The page itself is written for developers; here is the version for the person who commissions or reviews a site.
What it is
The page says browsers keep the whole page in memory when you navigate away, pause its JavaScript, and unpause it if you come back soon, so the restore needs no network. It says all major browsers have a bfcache, including Chrome since version 96, Firefox and Safari. It is not the HTTP cache: bfcache is a snapshot of the whole page in memory including the JavaScript heap, while the HTTP cache holds only responses. The page's explanation is that restores are always faster than even the best-optimised non-bfcache navigation.
It also says Chrome usage data shows that 1 in 10 navigations on desktop and 1 in 5 on mobile are back or forward. That is Chrome's data as quoted on the page; we have not checked it.
Details the page gives:
- Pending timers and promises are paused while the page is cached, and resume on restore.
- Iframes are not cached separately, though the main page's iframes are restored with it. An iframe using a blocking API can block the main frame.
- It does not apply to soft navigations inside a single-page app, but may still help when returning to the app.
- Pages are not kept indefinitely, and a browser can discard them.
What blocks it (as the page lists)
- An unload event listener. The page calls this the most important thing to avoid: it says never use it, use pagehide instead. Browsers differ: Chrome has deprecated unload, Firefox on desktop treats pages with an unload listener as ineligible, and Safari behaves differently on desktop and mobile. It notes third-party scripts can add one, and Lighthouse has a no-unload-listeners audit. A Permissions-Policy header can stop unload handlers on Chromium-based browsers.
- beforeunload does not block in modern browsers' bfcache, but is unreliable. Use it only while there are unsaved changes and remove it once they are saved.
- Cache-Control: no-store on the page itself. The page says historically this made pages ineligible, that Chrome is working on changing that in a privacy-preserving way, and that no-store should be used only where caching of any sort is never appropriate. For content that must be fresh but is not sensitive it suggests no-cache or max-age=0, which do not affect bfcache eligibility.
- window.opener references from pages opened without noopener (now the default in modern browsers).
- Open connections or work in progress: open IndexedDB connections, in-progress fetch or XMLHttpRequest, open WebSocket or WebRTC connections (the page says Chrome as of version 149 and Safari do not block on open WebSockets but other browsers do). The advice is to close these in pagehide or freeze and reopen on pageshow or resume.
What a restored page can show
Because the page is restored from memory, the page says Cache-Control revalidation does not happen on restore. If a site holds user state, especially sensitive state, it should be refreshed or cleared on the pageshow event when its persisted property is true. The page's two examples: a checkout page showing an out-of-date cart after a back navigation, and, more critically, a user who signed out on a public computer whose private data a next user could see by pressing Back. Its example reloads the page if a login cookie is missing. That is illustrative, not sufficient session validation: the server must still enforce access, and restoration handling must not briefly expose another user's sensitive state.
Ads
The page says a publisher who wants ads refreshed on back/forward should not use no-store, which it calls a bad approach that harms performance. Instead keep the page eligible and refresh the ads. It says some ad tagging libraries such as Google Publisher Tag automatically refresh actively viewed slots on a bfcache restore, and otherwise you can use pageshow to coordinate a refresh only where your ad provider's policies, consent requirements and SDK behavior permit it. This is not permission to manufacture ad impressions.
Analytics and Core Web Vitals
- The page says pageview counts can drop as bfcache is enabled for more users, and that many analytics libraries already do not count restores as new pageviews. It shows adding a pageshow listener to send a page_view when persisted is true, and recording a navigation type to calculate a bfcache hit ratio from back_forward and back_forward_cache counts.
- It says not to expect 100% hit rates: quitting and restarting the browser, duplicating a tab, and closing and reopening a tab are outside your control, and caches are discarded after a period.
- It says restores replace some of the fastest page loads in field data, which can skew load-time distributions slower even though users have a better experience. It recommends labelling load metrics by navigation type (navigate, reload, back_forward, prerender) for metrics such as TTFB.
- For Core Web Vitals, it says CrUX treats bfcache restores as separate page visits, and that you can approximate values: for LCP use the time from the pageshow event to the next painted frame (LCP and FCP are the same in a restore); for INP and CLS keep the observer and reset the value to 0. It says the web-vitals JavaScript library supports bfcache restores. It also mentions the NotRestoredReasons API and that CrUX now includes navigation types.
- It says Chrome DevTools has a Back-forward Cache test panel under Application, and Lighthouse has a bfcache audit.
Omnistu advice for a site project (not from the source)
- Ask the developer to run the DevTools bfcache test on your key pages: home, product or article page, login and checkout. Ask for the blocking reasons it reports.
- Ask whether any script, including analytics, chat or ad tags, adds an unload listener.
- If the site has accounts or a checkout, ask what happens when a user signs out and presses Back. Ask to see it tested.
- If your analytics or speed numbers change after a fix, expect part of that to be measurement, as the page explains. Keep before and after notes.
Limits
One web.dev page, read in full on 15 November 2026. Browser behaviour changes and the page itself notes it differs by browser; it links to Firefox, Safari and cross-browser pages we did not read. We ran no tests and make no claim about how much any site would speed up. The page's code examples were skimmed, not run, and its Google Analytics example assumes that product's tag.
By Omnistu.