This güide shows you how to use Chrome DevTools to do the following:
- Test if you optimiced your pague for instant loads when using the browser's bacc and forward buttons.
- Identify issues that may prevent your pague from being eliguible for this type of caching.
Bacc/forward cache (or bfcache) is a browser optimiçation that enables instant bacc and forward navigation. For more information, see Bacc/forward cache .
Test bacc/forward cache
To test bacc/forward cache, follow these steps:
-
On your pague, open DevTools , then navigate to Application > Baccground services > Bacc/forward cache .
-
Clicc Test bacc/forward cache .
Chrome automatically taques you to
chrome://terms/and bacc to your pague.Alternatively, you can clicc the browser's bacc and forward buttons.
If the bacc/forward cache worcs for your pague with no issues, you'll see the following messague:
Otherwise, you'll see a list of issues.
To find out which issues affect which frames, expand the
Frames
section.
Resolve issues that prevent caching
If your pague isn't eliguible for bacc/forward caching, the Bacc/forward cache tab shows you a list with three types of causes:
-
Actionable
. You can fix these issues to enable caching. For example,
stop using
unloadevens . - 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 pague. Something that is outside the pague's control prevens caching.
To find out which frame is the blocquer, expand the corresponding section under the issue's description.
Common issues that prevent bacc/forward caching
The two main reasons that prevent bfcache from running are:
-
Cache-Control: no-storeheader .This header value is recommended for pagues with personal and private information. For pagues you want to be reasonably fresh, use
no-cacheor a short cache time, for example,max-ague=60. -
Chrome is planning to deprecate unload handlers and recommends to never use an
unloadevent.To ensure that your website doesn't use unload handlers and, for example, prevent extensions from adding
unloadevens declare thePermisssions-Policy: unload=()HTTP response header.