# 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.

Canonical: https://scaplet.com/glossary/bfcache

Glossary Glossary · Performance

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fbfcache%20(%22bfcache%20(back%2Fforward%20cache)%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fbfcache%20(%22bfcache%20(back%2Fforward%20cache)%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fbfcache%20(%22bfcache%20(back%2Fforward%20cache)%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fbfcache%20(%22bfcache%20(back%2Fforward%20cache)%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## 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

_01_At a glance

## What bfcache stores, and how it differs from the HTTP cache

The [HTTP cache](/glossary/http-caching) keeps individual responses. bfcache keeps the finished page: the DOM and the JavaScript heap as they were when you left. According to web.dev, JavaScript is paused while the page sits in the cache and resumed when the user comes back, so nothing is re-downloaded, re-parsed or re-run.

### Stores

HTTP cache

Individual responses such as HTML, CSS and images

bfcache

A snapshot of the whole page in memory

### On Back or Forward

HTTP cache

Page still parses, runs scripts and renders again

bfcache

Page is restored as it was, with scripts resumed

### Controlled by

HTTP cache

`Cache-Control` and related headers

bfcache

Browser eligibility rules, which your code can break

### Covers

HTTP cache

Any request that hits the cache

bfcache

Back and forward navigations only

web.dev's Chrome data puts back and forward navigations at about 1 in 10 on desktop and 1 in 5 on mobile, so the cache touches a real share of visits. It does not apply to soft navigations inside a single-page app.

_02_At 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(); });
```

**pagehide persisted is not a guarantee**On `pagehide`, `persisted: true` means the browser intends to cache the page, not that it will. Keep the cleanup there harmless, and do your state refresh in `pageshow`.

_03_How 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](/glossary/lighthouse) 10.0 added a bfcache audit that runs a similar test. For real traffic, count `pageshow` events with `persisted` true.

**Cache-Control: no-store on the page itself**web.dev says `no-store` historically prevents a page from entering bfcache, and suggests `no-cache` or `max-age=0` where you only need freshness. Restores skip revalidation, so keep `no-store` for pages whose contents must never be kept, such as sensitive screens.

_04_Your 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](/glossary/core-web-vitals) a restore reports LCP equal to FCP, with INP and CLS reset to 0. If your [real user monitoring](/glossary/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.

_01_ Does 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](/glossary/core-web-vitals) data rather than through any documented ranking rule.

_02_ Why 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. 01 [Back/forward cache (web.dev)](https://web.dev/articles/bfcache) web.dev · checked 2026-11-01
2. 02 [bfcache (MDN glossary)](https://developer.mozilla.org/en-US/docs/Glossary/bfcache) developer.mozilla.org · checked 2026-11-01

## Keep learning

[All glossary](/glossary)

[Learn Real user monitoring (RUM) Performance](/glossary/real-user-monitoring) [Related Lighthouse Performance](/glossary/lighthouse) [Read next Core Web Vitals Performance](/glossary/core-web-vitals) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Backlinks](/glossary/backlinks) [BERT](/glossary/bert) [Bid strategy (Google Ads)](/glossary/bid-strategy) [BigQuery export](/glossary/bigquery-export)

More in Performance
[Service worker](/glossary/service-worker) [Speculation rules](/glossary/speculation-rules) [Speed Index](/glossary/speed-index) [SVG](/glossary/svg) [Synthetic monitoring](/glossary/synthetic-monitoring) [Time to First Byte (TTFB)](/glossary/time-to-first-byte) [Time to Interactive (TTI)](/glossary/time-to-interactive) [Total Blocking Time (TBT)](/glossary/total-blocking-time) [TTL (time to live)](/glossary/ttl) [Viewport meta tag](/glossary/viewport-meta-tag) [WebP](/glossary/webp) [AVIF](/glossary/avif) [bfcache (back/forward cache)](/glossary/bfcache) [Brotli compression](/glossary/brotli-compression) [Cache-Control](/glossary/cache-control) [CDN](/glossary/cdn) [Chrome UX Report (CrUX)](/glossary/chrome-ux-report) [Content Security Policy](/glossary/content-security-policy) [Content-Length (HTTP header)](/glossary/content-length) [Core Web Vitals](/glossary/core-web-vitals) [Core Web Vitals report](/glossary/core-web-vitals-report) [CORS](/glossary/cors) [Critical CSS](/glossary/critical-css) [Critical rendering path](/glossary/critical-rendering-path)

Terms on this page
[HTTP caching](/glossary/http-caching) [Lighthouse](/glossary/lighthouse) [Real user monitoring (RUM)](/glossary/real-user-monitoring) [Core Web Vitals](/glossary/core-web-vitals)

Free · 2 minutes

## Know the term. _Now check your site._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
