On this page
What this issue is
A cache keeps a copy of a page so it can be served fast without asking your server each time. That is fine for a blog post, because everyone sees the same thing. It goes wrong when the page is personalised: it shows a cart, a logged-in name, an address, an order confirmation or a pre-filled form.
If the cache stores that page and hands it to the next visitor, the next visitor sees the first person's data. Common causes are a CDN rule such as Cloudflare's 'Cache Everything' applied to all URLs, a host or plugin cache that ignores cart and session cookies, and a server that sends a Set-Cookie header on a page that was then cached.
Why it costs you leads or sales
Visitors who see a stranger's name or items in their basket lose trust straight away. Many leave, and some report you. Others get a cart full of products they did not choose, or a checkout that charges or ships the wrong thing.
The opposite also happens: a cached empty cart shows to someone who added products, so they think the add-to-cart button failed and give up. Beyond lost sales, you carry legal and reputational risk.
- Visitor A loads cartPage includes A's items and name
- Cache stores pageNo rule says 'private'
- Visitor B requests cartCache answers without asking server
- B sees A's dataTrust lost, possible breach
The cache stores a personalised response and serves it to everyone after.
How to check if your site has it
Test as two different visitors who share nothing. Use a normal browser window and a private window on a different device or network if you can.
Add an item as visitor A
In a normal window, add a product to the cart and open the cart and checkout pages. Note what shows.
Open the same URLs as visitor B
In a private window (no cookies), open the same cart and checkout URLs. You should see an empty cart and no personal data.
Read the response headers
Open DevTools, Network tab, click the page request and look at Response Headers. Check
cache-control,set-cookie,cf-cache-status(Cloudflare),x-cacheorage.Look for HIT status
A
cf-cache-status: HITor anageabove 0 on a cart, account or thank-you page means a shared cache served it. That page should not be cached.Check logged-in pages too
Repeat for account, order confirmation and any page with a pre-filled form or a name in the header.
curl -sI https://example.com/cart/ | grep -iE 'cache-control|set-cookie|cf-cache-status|x-cache|age|vary'| Header | Safe on cart/checkout | Warning sign |
|---|---|---|
| cache-control | private, no-store | public, max-age=... |
| cf-cache-status | DYNAMIC or BYPASS | HIT |
| age | absent or 0 | a number above 0 |
| set-cookie | present only on uncached responses | present on a HIT response |
How to fix it
The principle is the same everywhere: private pages must bypass every shared cache, and the server must say so in its headers. Apply it at each layer you use (CDN, host, plugin).
Exclude cart, checkout and account
In your caching plugin (WP Rocket, W3 Total Cache, LiteSpeed Cache and similar), add
/cart/,/checkout/and/my-account/to the never-cache list. Most plugins do this for WooCommerce automatically, so check it has not been turned off.Exclude by cookie
Add the cookies
woocommerce_cart_hash,woocommerce_items_in_cartandwordpress_logged_in_to the cache-bypass cookie list.Check the host cache
Managed hosts often run their own page cache. Look in the host dashboard for cache exclusions and add the same URLs.
Avoid caching rules in front of Shopify
Shopify handles cart and checkout caching itself. If you put Cloudflare or another CDN in front, never use 'Cache Everything' on the store, and bypass
/cart*,/checkout*and/account*.Check apps
Personalisation or speed apps that cache HTML can cause this. Disable them one at a time and retest.
Not a tag fix, but check data layer output
GTM does not cache pages, but a cached page can carry another user's data in the data layer (email, order ID). Once the cache is fixed, check Preview mode to confirm the data layer holds only your own values.
Keep personal data out of cached HTML
Webflow pages are cached at the edge, so never render user-specific data into the page HTML. Load it after the page loads from a secured endpoint tied to the user's session.
Check membership and e-commerce pages
If you use Webflow Ecommerce or a third-party member tool, confirm that its account pages are not placed behind a custom CDN rule.
Check any proxy in front of your funnel
If a CDN sits in front of a custom domain for your funnels or memberships, bypass caching for pages that show contact details or order information.
Avoid personalised merge fields in cached pages
Pre-filled fields from URL parameters should not be saved by a cache. Test with two different contact links.
Check for an added CDN or proxy
Wix manages its own caching for carts and members pages. If you proxy the domain through another CDN, bypass cache for cart, checkout and member areas.
Check for an added CDN or proxy
Squarespace handles cart and account caching itself. If you added a CDN in front, bypass
/cartand/commercepaths and never cache everything.
Send private headers
On every response that depends on the user, send
Cache-Control: private, no-store. AddVary: Cookieif the same URL can be public or personal.Never cache responses that set cookies
Configure the CDN to skip caching when
Set-Cookieis present or when a session cookie is in the request.Add a CDN bypass rule
In Cloudflare, create a Cache Rule: if URI path contains
/cart,/checkoutor/account, or the cookie header contains your session cookie, set 'Bypass cache'. Put it above any 'Cache Everything' rule.
location ~ ^/(cart|checkout|my-account) {
add_header Cache-Control "private, no-store" always;
proxy_pass http://app;
}Purge the cache
Purge everything at each layer: CDN, host and plugin. Old cached copies keep leaking until they are removed.
Rotate anything sensitive
If cached pages exposed tokens, order links or session identifiers, invalidate them where your platform allows.
Record what happened
Note the time window, affected URLs and a likely number of people. You may need this for a privacy assessment.
Before
- cache-control: public, max-age=3600
- cf-cache-status: HIT on /cart/
- Visitor B sees visitor A's items
After
- cache-control: private, no-store
- cf-cache-status: DYNAMIC or BYPASS
- Each visitor sees only their own cart
How to confirm it's fixed
- Cart, checkout, account and thank-you pages return
private, no-storeor an equivalent. - Those pages show DYNAMIC, BYPASS or MISS, never HIT.
- A private window with no cookies sees an empty cart and no names.
- Two devices on different networks see different carts when each adds a different product.
- The cache was purged at CDN, host and plugin level.
- Public pages such as the home page and blog are still cached, so speed is not lost.
How to prevent it happening again
- Never use 'Cache Everything' without bypass rules for private paths and session cookies.
- Add the two-visitor test to your release checklist after any CDN, plugin or theme change.
- Keep a written list of URLs that must never be cached and review it when you add pages such as a new checkout step or portal.
- Load personal data with a request made after the page loads, tied to the user's session, rather than building it into cached HTML.
- Review caching rules whenever you switch host, add a CDN or install a performance plugin.
Day 1
A performance plugin update turns on full-page caching for all URLs.
Day 1, later
A customer views their cart and the page is stored.
Day 2
Other visitors start seeing that cart. A few emails arrive.
Day 3
You add bypass rules and purge all caches.
Day 3
Two-visitor test passes.
How FunnelGuard handles this
FunnelGuard does not check for this yet. Spotting one visitor's data on another visitor's page is a possible future check, but it is not something the service does today.
What FunnelGuard does do is run your real journeys, such as lead forms and checkouts, on a schedule from the EU or the US, and check each step. If a bad cache rule breaks the add-to-cart step, a form or a tracking hit, a failed run is re-checked from a second region and you get one alert with a screenshot and a likely cause. That can reveal a caching problem indirectly, but it will not tell you that private data is being shared.
To watch for this yourself, repeat the two-visitor test after each deploy or cache change, and keep an eye on the cf-cache-status and cache-control headers of your cart and account URLs. A free FunnelGuard plan (1 site, 2 journeys, daily checks, no card) can cover the basic journey while you do that.
Frequently asked questions
Questions people ask
Why is my website showing another customer's cart?
A cache is almost certainly storing the cart page after one visitor loads it and then serving that copy to others. This happens when a CDN rule such as 'Cache Everything' or a caching plugin does not bypass cart pages or session cookies. Exclude cart, checkout and account URLs from caching and purge the cache.
How do I stop Cloudflare caching my cart and checkout pages?
Create a Cache Rule that matches paths like /cart, /checkout and /account, or requests carrying your session cookie, and set it to 'Bypass cache'. Place it above any rule that caches everything. Then purge the cache and test with a private window.
Is showing another user's data from cache a data breach?
It can be. If personal data such as names, addresses or order details was shown to people who should not see it, privacy rules like GDPR may apply and may require an assessment or notification. Fix the cache, record the time window and affected pages, and consult whoever handles privacy for your business.
How can I tell if a page was served from cache?
Open DevTools, go to the Network tab, click the page request and read the response headers. cf-cache-status: HIT, x-cache: HIT or an age value above 0 means a shared cache served it. Private pages should show DYNAMIC, BYPASS or MISS.
What Cache-Control header should cart and account pages use?
Use Cache-Control: private, no-store. 'Private' tells shared caches such as CDNs not to store the page, and 'no-store' tells browsers not to keep it either. Also avoid caching any response that sets a cookie.
Does WooCommerce cache the cart page?
WooCommerce marks cart, checkout and account pages as not cacheable, and most caching plugins respect that. Problems appear when a plugin, host cache or CDN rule overrides it. Check that those URLs and the cart cookies are in the exclusion lists of every cache layer.
Will excluding cart pages from the cache slow my site?
Only slightly, and only on those pages. Product pages, blog posts and your home page can stay cached. Private pages must be built fresh for each visitor, which is the cost of keeping their data separate.
Does FunnelGuard detect cached pages with another visitor's data?
No, not yet. It is a possible future check. FunnelGuard does run your real journeys on a schedule and can alert you if a step, tracking hit or lead delivery breaks, so a caching change that breaks the journey may show up that way.
Related issues
- OPS-107CDN serving stale page after deployFix guide
- OPS-109Cached logged-in admin bar shown to visitorsFix guide
- OPS-110Cached form nonce expired (form rejects submissions)Fix guide
- OPS-111Cache stripping UTM/gclid query paramsFix guide
- OPS-112Cache keyed without currency/language (wrong prices)Fix guide
- OPS-115CDN purges failing / edge outageFix guide