New researchTechnical SEO & AI Search · 2027Explore the framework

Back/forward cache and Core Web Vitals: test return visits

Test whether back and forward navigation restores your pages, find bfcache blockers, and measure the effect without confusing restores with fresh loads.

Part of the Core Web Vitals series. For the full picture, start with Core Web Vitals: what they are, how they affect SEO and how to improve them.

Back/forward cache and Core Web Vitals intersect on a journey most speed audits skip: a user opens a result, visits another page, then presses Back. A browser may restore the earlier page from bfcache, a saved in-memory snapshot, instead of starting a new load. Google’s web.dev guide explains why these restores matter to the experience users actually have. This is distinct from the wider Core Web Vitals audit, which checks page templates and field data across visits.

What is the back/forward cache?

The back/forward cache stores a complete page state so the browser can resume it on a history navigation. It is not the same as an HTTP cache hit. Reusing downloaded CSS and images still requires work to reconstruct a page; restoring a bfcache entry can avoid much of that work.

The browser decides whether a page can be stored and whether a stored entry remains available. Treat bfcache as an opportunity, not a guarantee for every visit. A fresh landing from Google Search, an internal click and a Back navigation are different navigation types; measure them separately when diagnosing a speed complaint.

How does bfcache affect Core Web Vitals?

Core Web Vitals describe loading speed, responsiveness and visual stability as users experience them. The bfcache guidance notes that history restores feel faster than new page loads, so performance measurement needs to account for them. But bfcache is not a fourth Core Web Vital, and a passing DevTools test is not proof that your field LCP, INP or CLS will improve.

Journey What to inspect Common blind spot
First page load Field data and a lab trace One lab run cannot describe all users
Navigate away, then Back Whether the old page restores Lab tests often start with a new page
Interact after restore Fresh data, handlers and layout A fast restore can show stale or broken UI

The LCP, INP and CLS guides explain each metric. Use them when a slow first load or post-restore interaction is the actual problem; do not blame bfcache for every poor field score.

How do you test bfcache on a real page?

Test a representative journey, not only the homepage. In Chrome DevTools, open Application → Back-forward Cache and run its test. The browser navigates away and back, then reports whether it restored the page and, if not, which reasons are actionable. Google’s DevTools instructions describe the flow.

Repeat for a product page, a form and an authenticated route if your site has them. Eligibility may differ by template, scripts or browser. Record the URL, browser version, test result and user-visible behavior after Back. A successful cache restore that leaves an outdated cart or account state is not a successful experience.

For instrumentation, the pageshow event’s persisted value identifies a restored page:

window.addEventListener('pageshow', (event) => {
  if (event.persisted) refreshTimeSensitiveUi()
})

The function above is a placeholder for your own state refresh, not a request to reload every page. Avoid logging a bfcache restore as a fresh network load unless your analytics definitions explicitly call for it.

What prevents a page from being restored?

Use the DevTools reason before changing code. An unload event handler is one common blocker described by web.dev; pagehide or visibilitychange can often cover lifecycle work more safely. Other blockers vary by browser and can include how a page uses active connections or cache controls. Do not copy a generic list into a fix ticket without testing the affected route.

Review a change in this order:

  1. Identify the specific blocker and where it is installed, including third-party scripts.
  2. Decide whether the behavior is still needed when leaving the page.
  3. Replace it with the appropriate lifecycle event or cleanup, then test Back and Forward.
  4. Check that forms, prices, auth state and analytics are correct after restore.
  5. Compare real-user experience over time; don’t claim a ranking gain from eligibility alone.

If the blocker comes from a tag, use the third-party scripts guide to identify its owner and trade-off. If your own application code is responsible, the first-party JavaScript guide is the better follow-up.

Bfcache QA checklist

  • Test important templates with a real back/forward journey.
  • Capture the DevTools eligibility result and actionable reason.
  • Replace unnecessary unload work with a suitable lifecycle approach.
  • Refresh time-sensitive state after a restore without breaking the page.
  • Verify forms, auth, cart and analytics behavior after Back.
  • Judge the outcome using user experience and field data, not a single eligibility flag.

Frequently asked questions

Is bfcache the same as the HTTP cache?

No. The HTTP cache stores responses such as HTML or assets for reuse; bfcache preserves a whole page state for back and forward navigation. A bfcache restore may avoid a new page load altogether.

Does enabling bfcache guarantee better Core Web Vitals?

No. It can make eligible history navigations faster, but not every visit uses back or forward, and browsers may decide not to restore a page. Continue measuring real-user LCP, INP and CLS rather than treating bfcache eligibility as a score.

How can I tell whether a page was restored from bfcache?

Run Chrome DevTools' Back-forward Cache test and check its result. In page code, a `pageshow` event whose `persisted` property is true indicates a bfcache restore.

Should I remove every unload listener to fix bfcache?

Review why each listener exists first. An `unload` handler can block bfcache in some browsers; `pagehide` or `visibilitychange` may better express the intended lifecycle work. Test the replacement for data loss and stale UI before release.

· Founder, Crawlens

Dien builds Crawlens, a desktop crawler for technical SEO audits, and writes about the checks it runs: crawling, indexing, rendering and Search Console data.

Audit your own site with Crawlens

Crawl, run 70 checks, and see them next to Search Console and Core Web Vitals data.

Download free for Windows