User Tools

Site Tools



For more details see the Back Forward Cache extension page.

Guide for Back Forward Cache for Magento 2

Ensure instant page loading when users navigate through your website using the back and forward buttons. Enhance the website’s performance & UX by caching recently visited pages.

  • Automatically cache recently viewed pages
  • Exclude specific pages from caching
  • Improve Core Web Vitals field data
  • Reduce server load
  • Multiple browsers support
Please be aware that the Back Forward Cache extension does not work when Varnish Cache is enabled


Enable Back Forward Cache - set Yes to enable back/forward caching for your website.

Mini Cart Update - сhoose the scenario for mini cart updates. It can be updated immediately on page restore from bfcache or only after user interaction when the page was restored from bfcache.

Exclude Pages from Caching - specify route names for pages that are not allowed to be cached by bfcache. Write each route name from new line.


Varnish Cache Compatibility

To ensure the correct functioning of the Back Forward Cache module with Varnish, you need to update your .vcl file as follows:

sub vcl_deliver {
<!—Update following line: -->
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, ma
<!-- To: -->
set resp.http.Cache-Control = "no-cache, must-revalidate, max-age=0";

Find out how to install Back Forward Cache for Magento 2 via Composer.

Rate the user guide
 stars  from 0 votes (Details)
magento_2/back_forward_cache.txt · Last modified: 2024/04/08 08:51 by kkondrateva