BFCache (Back/Forward Cache)
BFCache keeps pages in browser memory so back/forward navigation feels instant. ZiziCache enables BFCache for logged-in users by adjusting headers and validating sessions in the browser.
Supported in the UI: Chrome 96+, Firefox 120+, Safari 17+.
How ZiziCache enables BFCache
- Runs only for logged-in users with a BFCache session token.
- Skips admin pages, REST requests, AJAX, cron, and the Customizer.
- When the response contains
Cache-Control: no-store, ZiziCache removesno-store(andpublic) and addsprivate, no-cache, max-age=0, must-revalidate. This allows BFCache while preventing proxy caching. - A frontend script checks the BFCache token on
pageshow. If the token changed (logout or account switch), the page is immediately reloaded to avoid stale content.
Settings in this tab
- Enable BFCache master switch.
- Require Remember Me only users with a long-lived login cookie get BFCache tokens.
- Require JavaScript a login detector cookie (
zizi_js_enabled) must be present to issue tokens. - URL Exclusions one pattern per line, wildcards supported.
- Auto-exclude WooCommerce cart, checkout, and account pages.
- Debug mode console logging and diagnostics.
- Token lifetime saved in configuration. Session validity follows WordPress login/session expiration.
- Invalidate on logout tokens are cleared on logout by the plugin; the toggle is stored in config.
Tools
- Active Sessions status from
/wp-json/zizi-cache/v1/bfcache/status. - Clear All Tokens clears all BFCache tokens via
/wp-json/zizi-cache/v1/bfcache/clear-tokens. - Test BFCache runs diagnostics via
/wp-json/zizi-cache/v1/bfcache/testand returns recommendations.
When to use it
BFCache is best for logged-in dashboards and member areas where users navigate back and forth frequently. Exclude sensitive or highly dynamic URLs to avoid stale views.