A WooCommerce cart that looks outdated only after pressing Back may be showing a restored browser page, not a fresh response from your CDN. Before purging every cache, compare normal loading, reload and Back navigation. The distinction determines whether you need to repair response caching or refresh page state after restoration.
Browsers can keep a page snapshot in the back/forward cache, often called bfcache. The web.dev bfcache guide documents the pageshow event and its persisted property for detecting a restoration. This is different from an ordinary HTTP cache hit.
Reproduce With a Test Cart
Use staging and a test product. Write down its price, selected variation, quantity and cart total. Open the cart, navigate to another page, change the cart through a separate supported interaction, then return with Back. Avoid real payment submission during this diagnostic.
Compare the visible cart, mini-cart and the server's current cart response. Inspect the request your installed cart implementation actually uses; do not assume classic cart fragments and Cart blocks share an identical refresh mechanism.
| Navigation |
Question |
| Direct visit |
Does a newly loaded page show the right cart? |
| Reload |
Does a network reload correct the display? |
| Back |
Does stale state return only through history? |
| Cart update |
Does a supported quantity change reconcile all totals? |
Record the browser version and whether the test used an existing logged-in session or a fresh guest session. Do not export session cookies or cart tokens into a shared report.
Direct visit: Current values on fresh load. Reload: Compare with history navigation. pageshow: Record persisted on restoration. Purchase: Never replay order submission. Explanatory checklist, not a customer test result.
Observe Restoration Without Changing the Cart
On a test page, a developer can temporarily add a diagnostic listener:
window.addEventListener('pageshow', (event) => {
console.info('history restoration', event.persisted);
});
Use a staging script that is loaded before the navigation sequence. A console snippet pasted after returning cannot report the event that already happened. Remove temporary logging once the result is understood.
If persisted is true when the stale display appears, investigate the component's restoration behavior. If the page loads normally and the response itself is stale, continue with the cart cache and fragment diagnosis. The two problems can coexist, so preserve evidence for both paths.
Refresh State Without Repeating a Purchase
A custom cart should reconcile with its authoritative cart state when required. Use the supported interfaces of the installed WooCommerce version and extensions. Do not attach a generic reload loop to every page or blindly replay the request that placed an order.
Test any repair with quantities, variations, coupons, empty carts and a failed network request. A refresh failure should not display an invented zero total or erase the customer's choices. Ensure the checkout still recalculates and validates on the server before payment.
Should You Disable bfcache Across the Entire Site?
Not as the first response. That sacrifices a useful navigation optimization without proving it fixes the component. A narrowly scoped state repair is easier to test and explain.
Before release, repeat the original Back sequence in the browsers customers actually use. Get help with stale cart behavior if the correct fix depends on a custom mini-cart or checkout extension.
References reviewed October 15, 2026. Examples are explanatory, not customer test results.