Overview Open Chrome DevTools Simulate mobile devices with Device Mode Performance insights: Get actionable insights on your website's performance Lighthouse: Optimize website speed Animations: Inspect and modify CSS animation effects Changes: Track your HTML, CSS, and JavaScript changes Coverage: Find unused JavaScript and CSS CSS Overview: Identify potential CSS improvements Issues: Find and fix problems Media: View and debug media players information Memory Inspector: Inspect JavaScript ArrayBuffer Network conditions: Override the user agent string Recorder: Record, replay and measure user flows Security: Understand security issues WebAuthn: Emulate authenticators
Overview Open Chrome DevTools Simulate mobile devices with Device Mode Performance insights: Get actionable insights on your website's performance Lighthouse: Optimize website speed Animations: Inspect and modify CSS animation effects Changes: Track your HTML, CSS, and JavaScript changes Coverage: Find unused JavaScript and CSS CSS Overview: Identify potential CSS improvements Issues: Find and fix problems Media: View and debug media players information Memory Inspector: Inspect JavaScript ArrayBuffer Network conditions: Override the user agent string Recorder: Record, replay and measure user flows Security: Understand security issues WebAuthn: Emulate authenticators

Test back/forward cache

Published on

This guide shows you how to use Chrome DevTools to do the following:

  • Test if you optimized your page for instant loads when using the browser's back and forward buttons.
  • Identify issues that may prevent your page from being eligible for this type of caching.

Back/forward cache (or bfcache) is a browser optimization that enables instant back and forward navigation. For more information, see Back/forward cache.

Gotchas

Back/forward cache differs from browser cache and HTTP cache.

To inspect cache data, follow the steps in View cache data.

To inspect HTTP cache data, open the Size column of the Network Log. See Log network activity.

Test back/forward cache

To test back/forward cache, follow these steps:

  1. On your page, open DevTools, then navigate to Application > Cache > Back/forward cache.

    Back/forward cache tab
  2. Click Test back/forward cache. Chrome automatically takes you to chrome://terms/ and back to your page.

    Alternatively, you can click the browser's back and forward buttons.

If the back/forward cache works for your page with no issues, you'll see the following message:

Successfully served from back/forward cache

Otherwise, you'll see a list of issues explained in the next section.

Identify and resolve issues that may prevent caching

If your page isn't eligible for back/forward caching, the Back/forward cache tab shows you a list with three types of causes:

Not eligible for back/forward cache
  • Actionable. You can fix these issues to enable caching. For example, stop using unload events.
  • Pending Support. Chrome doesn't support these features yet, so they prevent caching. However, once supported, Chrome removes these limitations.
  • Not Actionable. You can't fix these issues on this page. Something that is outside the page's control prevents caching.

Last updated: Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.