On this page
What this issue is
A cache keeps a saved copy of a page so it loads fast. That is fine for pages that look the same for everyone. It goes wrong when the saved copy was made for a logged-in user and the cache hands it to anonymous visitors.
Typical causes: a CDN that caches HTML ignoring cookies, a WordPress caching plugin without a rule for the login cookie, a missing Vary: Cookie header, or personal content (mini-cart, greeting, account menu) rendered on the server into a cached page.
- Customer logs inPage is built with their name and cart
- Cache stores pageNo rule excludes logged-in responses
- New visitor requests itGets the saved copy
- Visitor sees wrong dataWrong name, cart or dead forms
The cache saves the first response and replays it to everyone after.
Why it costs you leads or sales
Visitors who see another person's name or cart lose trust and leave. Forms inside a cached page can carry the wrong security token and be rejected. Buttons such as Add to cart or Log in may point to the wrong state. There is also a privacy risk: personal data shown to strangers can create legal trouble.
The problem is often intermittent, so it hides. Staff are logged in and see a normal site, while guests get the bad copy.
Example: illustrative numbers showing how visitors who get a leaked logged-in page may start checkout less often.
How to check if your site has it
Compare logged-in and guest views
Log in in one browser. Open the same URL in a private window with no login. Look for names, cart counts, admin bars or account links showing in the guest view.
Check response headers
In browser dev tools, Network tab, click the page request and read the response headers. Look at
Cache-Control,Age,Varyand any cache status header such asX-CacheorCF-Cache-Status.Test with curl
Request the page without cookies, then with a login cookie, and compare the output and cache headers.
Look at personal URLs
Check /cart, /checkout, /my-account and any page with a greeting or mini-cart.
curl -sI https://example.com/cart/ | grep -iE 'cache-control|age|vary|x-cache|cf-cache-status|set-cookie'
curl -sI -H 'Cookie: wordpress_logged_in_xxx=test' https://example.com/cart/ | grep -iE 'cache-control|age|vary|x-cache|cf-cache-status'How to fix it
The rule is the same everywhere: pages that depend on who the user is must not be stored in a shared cache. The exact setting depends on your platform and cache layer.
Exclude logged-in users from page cache
In your caching plugin, turn on the option to not cache pages for logged-in users (the wording varies by plugin).
Exclude cart pages and cookies
Add /cart, /checkout and /my-account to the never-cache list. For WooCommerce, also exclude the woocommerce_items_in_cart and wp_woocommerce_session cookies.
Purge all caches
Clear the plugin cache, server cache and CDN cache, then retest as a guest.
Check theme and apps
Shopify handles page caching itself. Leaks usually come from a third-party proxy, CDN in front of the store, or an app that caches personalised sections. Disable them one at a time to find it.
Render personal content client-side
Load cart count and customer greeting through the Cart AJAX API or Liquid customer checks at request time, not from a copied page.
Not the cause, but check
GTM does not cache pages. If a data layer holds a user ID or email from a cached page, tags may send the wrong person's data. Confirm the data layer values change per visitor.
Check any proxy or CDN in front
Webflow pages are public. Personal data usually comes from a membership or third-party script. Make sure any proxy you added does not cache the API responses or pages for logged-in users.
Check custom domain proxy
If you put a CDN in front of a funnel or membership area, set it to bypass cache for logged-in and member URLs.
Check external caching
Wix manages caching. If members see wrong data, test without any external proxy or CDN in front of the domain and contact Wix support with your test results.
Check external caching
Squarespace manages caching. If you use a proxy on your domain, set it to bypass cache for account and cart URLs.
Send private headers on personal pages
Add
Cache-Control: private, no-storeto any response that depends on the user.Add Vary where the page differs by cookie
If one URL serves both guests and users, send
Vary: Cookieand configure the CDN to respect it or bypass cache when a session cookie is present.
set $skip_cache 0;
if ($http_cookie ~* "wordpress_logged_in|woocommerce_items_in_cart|wp_woocommerce_session") {
set $skip_cache 1;
}
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;<?php
header('Cache-Control: private, no-store');
header('Vary: Cookie');Before
- Cart page cached for everyone
- No Vary or private header
- Guests see a stranger's name
After
- Personal URLs bypass the cache
- Private header on user-specific responses
- Guests always get the generic page
How to confirm it's fixed
- Purge every cache layer (plugin, server, CDN).
- Log in, load the personal page, then open it as a guest in a private window: no personal data shows.
- Headers on personal pages show private or no-store and a cache status of MISS or BYPASS.
- Repeat the check on mobile and from a different network.
- Submit a test form as a guest and confirm it goes through.
How to prevent it happening again
- Keep a written list of URLs and cookies that must never be cached.
- Re-test after changing plugins, themes, CDN rules or hosting.
- Avoid putting names or cart data in server-rendered HTML that gets cached; load them after the page loads.
- Check as a guest, not only as an admin, after every release.
- Set a short cache lifetime for HTML pages that must be cached.
How FunnelGuard handles this
FunnelGuard does not check for this yet. Spotting a leaked logged-in page is a possible future check, not a current feature.
What it does cover nearby: a robot visitor runs your real journeys, such as lead forms and checkouts, as a guest on a schedule. It checks each step and the tracking hits sent to ad and analytics platforms. If a leaked page breaks a form or a button, the journey can fail and you get one alert with a screenshot and a likely cause. It will not tell you a stranger's name appeared on the page.
To watch for this yourself, add a monthly guest-versus-logged-in comparison to your release checklist, and use your CDN's cache analytics to see whether HTML for cart and account URLs is being served from cache. FunnelGuard has a Free plan (1 site, 2 journeys, daily checks, no card) if you want guest journeys tested automatically.
Questions people ask
Why is my website showing another user's name to visitors?
A cache probably saved a page built for a logged-in user and is serving it to guests. Check that your page cache or CDN bypasses cache when a login or cart cookie is present, then purge all caches.
How do I stop a CDN caching logged-in pages?
Add a rule that bypasses cache when session or login cookies are present, and send Cache-Control: private on user-specific responses. Also make sure cart, checkout and account URLs are never cached.
Why does my cart show items I did not add?
Your cart page or mini-cart was likely cached and shared between visitors. Exclude cart URLs and cart cookies from the cache, and load cart counts dynamically.
Does Cache-Control private stop shared caching?
Yes. private tells shared caches such as CDNs and proxies not to store the response, while allowing the user's own browser to keep it. Use no-store for the most sensitive pages.
How can I test if my site serves logged-in cache to guests?
Log in in one browser, load the page, then open the same URL in a private window. Compare content and check headers such as Age and X-Cache for signs it came from cache.
Is a leaked logged-in page a privacy problem?
It can be. If names, emails, orders or addresses reach other visitors, that may count as a data exposure. Fix it quickly and consider getting legal advice if real customer data was shown.
Does FunnelGuard detect logged-in cache leaks?
No, not yet. It is a possible future check. FunnelGuard does run guest journeys on a schedule, so a leak that breaks a form or button may show up as a failed step.
Related issues
- CNV-381Cached page serves stale CSRF/nonce (WordPress cache)Fix guide
- CNV-376Session cookie lost between stepsFix guide
- CNV-380CSRF token expired, form rejects submitFix guide
- CNV-383Cookie consent state not respected after choiceFix guide
- CNV-377Cookie too large, server 400 errorFix guide
- CNV-378SameSite settings break iframe login/checkoutFix guide