kb/data/developer.mozilla.org/en-US/docs/Glossary/bfcache-0.md

10 KiB

title chunk source category tags date_saved instance
bfcache - Glossary | MDN 1/3 https://developer.mozilla.org/en-US/docs/Glossary/bfcache reference web, html, css, javascript, documentation 2026-05-05T05:50:01.435395+00:00 kb-cron

MDN HTML HTML: Markup language

HTML reference

HTML guides

Markup languages

CSS CSS: Styling language

CSS reference

CSS guides

Layout cookbook

JavaScriptJS JavaScript: Scripting language

JS reference

JS guides

Web APIs Web APIs: Programming interfaces

Web API reference

Web API guides

All All web technology

Technologies

Topics

Learn Learn web development

Frontend developer course

Learn HTML

Learn CSS

Learn JavaScript

Tools Discover our tools

About Get to know MDN better

Blog

  1. Glossary
  2. bfcache

bfcache

The back/forward cache, or bfcache , is a performance-enhancing feature available in modern browsers that enables instant back and forward navigation between previously-visited pages. It does this by storing a complete snapshot of a page as the user navigates away from it; the browser can then quickly restore the snapshot if the user decides to return to it, rather than needing to repeat the network requests required to load the page. The snapshot contains the entire page in memory, including the JavaScript heap; in-progress code is paused when the user navigates away and resumed when they return to the page. A regular HTTP cache entry on the other hand contains only responses to previous requests. The bfcache therefore provides faster results than the HTTP cache. The downside is that bfcache entries require more resources, and create complexity in terms of how to represent in-progress code. Some code features (for example the unload handler) are not compatible, so their presence on a page blocks it from using the bfcache. The bfcache is great for performance, so it is in your interests to make sure your pages are not blocked from using it. You can use the notRestoredReasons API to monitor whether pages are blocked from using the bfcache, and reasons why.

In this article

See also