Free auditStart free
GlossaryGlossary · Performance

bfcache (back/forward cache)

bfcache keeps a whole page in memory so Back and Forward feel instant. What blocks it, the pageshow check and the DevTools test that tells you why a page missed.

3 min
read
2
sources
Oct 30, 2026
updated
Scaplet Editorial Team
author
In one line

bfcache, the back/forward cache, is a browser feature that stores a full snapshot of a page in memory when the user leaves it, so pressing Back or Forward restores it almost instantly without a network request. Pages with an unload listener or Cache-Control: no-store, among other things, can miss the cache.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
A snapshot of the whole page, including its JavaScript heap
What is stored
Back and forward navigations, not soft navigations in single-page apps
Applies to
Since version 96
Chrome support
DevTools, Application, Back-forward Cache, Run Test
Test it
02At a glance

Anatomy of a bfcache-friendly page

Part

pageshow + event.persisted

Job
persisted is true when the page was restored from bfcache and false on a normal load
Part

pagehide

Job
Fires in every case unload does, plus when a page enters bfcache. Release connections here and reopen them in pageshow
Part

No unload listener

Job
Firefox makes such pages ineligible on desktop, Chrome has deprecated unload, and Safari does not run it reliably
Part

rel="noopener" on links that open windows

Job
A window.opener reference makes a page unsafe to cache
Detect a restore and clean up properly
// Fires on first load AND on every bfcache restore
window.addEventListener('pageshow', (event) => {
  if (event.persisted) {
    // Page came back from bfcache: refresh stale or sensitive state
    refreshSessionState();
  }
});

// Use pagehide, not unload, to release resources
window.addEventListener('pagehide', () => {
  db.close();   // open IndexedDB connections can block caching
  socket.close();
});
03How it works

Check it in 2 minutes

  1. 1

    Open the test

    In Chrome DevTools, go to Application, then Back-forward Cache, and click Run Test.

  2. 2

    Read the result

    DevTools navigates away and back. On success it reports that the page was restored from the back-forward cache. On failure it lists the reasons and marks the ones you can fix as Actionable.

  3. 3

    Fix and rerun

    Remove the first actionable blocker, rerun, and repeat. Common culprits are an unload listener, Cache-Control: no-store on the document and open connections.

  4. 4

    Confirm in the field

    Lighthouse 10.0 added a bfcache audit that runs a similar test. For real traffic, count pageshow events with persisted true.

04Your call

What it does to your measurements

Restores are often the fastest loads a user has, so they can skew a load-time distribution. web.dev notes that many analytics libraries don't count restores as pageviews, and that for Core Web Vitals a restore reports LCP equal to FCP, with INP and CLS reset to 0. If your real user monitoring data suddenly looks better after a release, check whether bfcache eligibility changed before crediting a code change.
If this fits

Worth chasing if

  • Your users move back and forth between listing and detail pages
  • DevTools shows actionable blockers you can remove in an afternoon
  • You have an old unload handler that only saves state
Or

Leave it if

  • The page must never be kept in memory, such as one showing sensitive data
  • The blocker is a third-party iframe you cannot change
  • Your traffic is almost entirely single-page-app soft navigations, which bfcache does not cover
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Does bfcache affect SEO?

The sources describe it as a user-experience and measurement matter, not a crawling one. It changes how fast Back and Forward feel and how field metrics are reported, so it shows up through Core Web Vitals data rather than through any documented ranking rule.

02Why is my page not eligible?

Run the Back-forward Cache test in Chrome DevTools. It lists the exact reasons and flags the actionable ones. The usual ones are unload listeners, Cache-Control: no-store, window.opener references and open connections.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • web.dev
  • mozilla.org
  1. 01Back/forward cache (web.dev)web.dev · checked 2026-11-01
  2. 02bfcache (MDN glossary)developer.mozilla.org · checked 2026-11-01
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly