[ Web Proxy ]
URL:
Viewing: https://developer.chrome.com/docs/devtools/application/back-forward-cache [Back]  [Original]

Test back/forward cache  |  Chrome DevTools  |  Chrome for Developers Skip to main content
Chrome for Developers [Chrome for Developers]

Test back/forward cache Stay organized with collections Save and categorize content based on your preferences.

Sofia Emelianova [Sofia Emelianova]
Sofia Emelianova

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

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

Key point: 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 > Background services > Back/forward cache.

    Back/forward cache tab. [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. [Successfully served from back/forward cache.]

Otherwise, you'll see a list of issues.

To find out which issues affect which frames, expand the Frames Expand icon. [Expand icon.] section.

Expanded Frames section. [Expanded Frames section.]

Resolve issues that 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. [Not eligible for back/forward cache.]

To find out which frame is the blocker, expand the corresponding section under the issue's description.

Blocking frames. [Blocking frames.]

Common issues that prevent back/forward caching

The two main reasons that prevent bfcache from running are:

Tip: To test a bfcache fix, you can mock a response header with overrides.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-05-04 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-05-04 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page