Mechanical ComparisonBack/Forward Cache (bfcache): Baseline · WidelySpeculation Rules & Prerendering: Experimental

Back/Forward Cache (bfcache) vs Speculation Rules & Prerendering

Mechanical Verdict

bfcache accelerates Back/Forward history traversal; Speculation Rules accelerates forward navigations.

Try Back/Forward Cache (bfcache) LabTry Speculation Rules & Prerendering LabRead Back/Forward Cache (bfcache) DissectionRead Speculation Rules & Prerendering Dissection

Structured Comparison Matrix

DimensionBack/Forward Cache (bfcache)Speculation Rules & Prerendering
Mental ModelIn-memory cache snapshotting the full JS heap and DOM tree on outbound navigation to restore the page instantaneously on Back/Forward.Declarative JSON rules that prefetch or fully prerender predicted next navigations in a hidden browsing context, delivering near-instant 0 ms LCP on click.
Maturity & DomainBaseline · Widely · Network & Performance
Chrome 96+ · Firefox 1.5+ · Safari 1+
Experimental · Network & Performance
Chrome 109+ · Firefox No (in development) · Safari No
PrerequisitesFoundational primitiveFoundational primitive
When Not to UseWhen not to use bfcache: On banking or authenticated views displaying sensitive data after logout, enforce Cache-Control: no-store or clear sensitive DOM on pagehide.When not to use prerender: Avoid prerendering URLs with server-side side effects (logout links, add-to-cart GET endpoints) or pages heavy on WebGL/video memory.

Engine Mechanics & Trade-Offs

Back/Forward Cache (bfcache)Baseline · Widely

Full JS heap and DOM tree preserved in RAM.

Key Pitfalls: unload listener in a third-party script: A single window.addEventListener('unload', ...) disables bfcache across the entire site. Stale state on return: A shopping cart or CSRF token restored from bfcache remains frozen; listen to pageshow (if (e.persisted)) to refresh volatile data.

Speculation Rules & PrerenderingExperimental

Spawns a hidden background renderer tab to fetch, parse, and paint a predicted next navigation, swapping it atomically on click for near-zero LCP.

Key Pitfalls: Inflated analytics & ad beacons: Scripts that fire on DOMContentLoaded count phantom pageviews for every hovered link; gate telemetry on !document.prerendering and prerenderingchange. eagerness: immediate on large lists: Putting immediate on a 30-item catalog grid DDoS-attacks your own origin server on every page load.

Seen in Architecture Autopsies