On this page
What this issue is
A cache keeps a saved copy of a page so it loads fast. The cache key is the label the cache uses to decide whether two requests are the same page. By default, most caches build the key from the host and the URL path only.
If your site changes the price or language based on the visitor's country, a cookie or a header such as Accept-Language, the URL stays the same but the content differs. The cache sees one URL, stores the first version it gets, and serves it to everyone. A visitor in Paris who arrives first can set the page to euros for the next visitor in New York.
Why it costs you leads or sales
Visitors who see the wrong currency or language lose trust fast. A price in the wrong currency looks like an error, a surprise at checkout, or a scam. Ad traffic aimed at one market lands on a page meant for another, so your ad spend is wasted.
There is also a mismatch risk. The cached page may show one price while the cart or checkout calculates another. That gap causes abandoned carts and support tickets, and in some regions it can raise pricing-display compliance questions.
- EU visitor loads pageSite renders prices in EUR
- Cache stores one copyKey is the URL only, no currency
- US visitor loads pageGets the EUR copy
- CheckoutPrice mismatch or exit
The first visitor's version is stored and reused for everyone on the same URL.
Example: illustrative numbers showing how a wrong-currency price could lower the share of visitors who start checkout.
How to check if your site has it
The cache problem is only visible when you request the page the way different visitors would. Test a product or pricing page that changes by market.
Load the page from two markets
Use a VPN or a browser in another country, or ask a colleague abroad. Compare the currency and language shown.
Switch currency, then reload in a clean window
Change currency in one window, then open the same URL in a private window with no cookies. If you see the switched currency, the cache is sharing it.
Read the cache headers
Open DevTools, Network tab, click the page request and look at the response headers. A
cf-cache-status: HITorx-cache: HITon a page that should vary is a warning sign. Check theVaryheader too.Compare page price with cart price
Add the product to the cart and see whether the cart currency matches the product page.
curl -sI -H 'Accept-Language: de' https://example.com/product | grep -iE 'cache|vary|age|set-cookie'
curl -sI -H 'Accept-Language: en-GB' https://example.com/product | grep -iE 'cache|vary|age|set-cookie'How to fix it
You have three options. Pick the simplest one that fits your setup. Best: give each currency or language its own URL, such as /en-gb/ or ?currency=GBP. Next: add the cookie or header to the cache key. Fallback: bypass the cache on pages where price varies.
Check your currency or language plugin
Plugins such as WooCommerce currency switchers and WPML or Polylang set a cookie or URL. Read the plugin's caching notes and enable its cache-compatible mode if it has one.
Exclude the currency cookie from caching or vary by it
In your caching plugin (for example WP Rocket, LiteSpeed Cache or W3 Total Cache), find the settings for cache exclusions or 'Cache vary cookies' and add the cookie name your plugin uses. Check the cookie name in DevTools, Application tab.
Prefer language URLs
Set WPML or Polylang to use a directory per language, so each language has a separate URL and separate cache entry.
Purge the cache
Clear the plugin cache and the CDN cache after changing settings.
Use Shopify Markets URLs
In Settings, Markets, set each market to use its own domain or subfolder, such as /en-gb. Each market then has its own URL.
Avoid adding your own full-page cache in front
Shopify handles its own caching. If you put a CDN or proxy in front, make sure it does not cache pages that depend on the localization cookie.
Check apps that change prices
Currency converter apps often rewrite prices in the browser. Test them from another country after any change.
Send a Vary header
If the server picks language from
Accept-Language, sendVary: Accept-Language. Be aware that it can split the cache into many copies, so normalise the value to a few languages first.Prefer explicit URLs
Put the market in the path or a query parameter, and keep that parameter in the cache key.
Do not cache pages with Set-Cookie for currency
Send
Cache-Control: privateon pages whose content is personal to the visitor.
Use localization with subdirectories
In Webflow Localization, give each locale its own subdirectory so each version has a distinct URL.
Check any custom currency script
If a script swaps prices by country in the browser, the cached HTML is the same for everyone; test the swapped result from another country.
If you use Cloudflare, you can change what goes into the cache key with a Cache Rule. The exact menu and options depend on your plan, so check the current Cloudflare documentation. On many plans you can bypass cache for a path or cookie, which is the safest fix.
Open Caching, Cache RulesCloudflare
Create a rule for the pages that vary, for example a URI path starting with /product or a request cookie containing your currency cookie name.
Set the actionCloudflare
Choose Bypass cache, or on plans that allow it, customise the cache key to include the cookie or header.
Save and purgeCloudflare
Deploy the rule, then use Purge Cache for the affected URLs so old wrong copies are removed.
Before
- Cache key is the URL only
- One currency stored for all visitors
- Cart and page prices can disagree
After
- Each market has its own URL or cache key
- Visitors see their own currency and language
- Page price matches cart price
Key ignores currency
Leads or data lost
The first visitor's currency is stored and shown to everyone, so many visitors see the wrong price.
Toggle the cause to see how the cache key changes what visitors see.
How to confirm it's fixed
- Purge the page cache and the CDN cache
- Load the page from at least two countries and see the right currency in each
- Switch currency in one window; a clean private window still shows its own default
- Reload each page twice so you test both a MISS and a HIT
- Page price equals cart and checkout price
- Language matches the market on key landing pages
How to prevent it happening again
- Give every market its own URL where you can
- Document which cookies and headers change page content
- Re-test from another country after changing cache, CDN, theme or currency plugin settings
- Re-check after deploys that touch caching rules
- Keep a short list of price-sensitive pages to test each time
How FunnelGuard handles this
FunnelGuard detects this only partly. Its check, called price_consistent, looks at whether the price a visitor sees stays consistent as the robot runs a journey, for example between the page and the later steps. The robot runs from the EU or the US and re-checks a failure from a second region before one alert goes out.
It does not test every country, every currency or every language. It cannot tell whether a visitor in a market it does not run from sees the right currency, and it does not review your cache key settings. A wrong price served only in a region FunnelGuard does not visit can go unseen.
To cover the rest by hand, use the manual checks above: load key pages from the markets you sell in, compare cache headers, and compare page price with cart price after each change to caching or currency settings. FunnelGuard has a Free plan (1 site, 2 journeys, daily checks, no card), and paid plans start at $39/month with a 3-day free trial.
Questions people ask
Why is my website showing the wrong currency to some visitors?
Most often a CDN or page cache stored one copy of the page and serves it to everyone on the same URL. If the currency is set by a cookie, header or location but the cache key only uses the URL, the first visitor's currency is reused. Give each currency its own URL or add the currency to the cache key.
How do I make my CDN cache different prices for different countries?
Either use separate URLs per market, such as /en-gb/ and /en-us/, or customise the cache key to include a country, cookie or normalised header. If your plan does not allow custom cache keys, bypass the cache for price-varying pages. Purge the cache after any change.
Why does my product page show euros but the cart shows dollars?
The product page is probably a cached copy from another visitor, while the cart is generated live for you. This price mismatch is a typical sign of a cache key missing currency. Check the page headers for a cache HIT and compare from a clean session.
Does Cloudflare cache pages with different languages separately?
Not automatically. By default the key is based on the URL, so two languages on one URL can share a single cached copy. Use a separate URL per language, or set up a Cache Rule that bypasses cache or includes the language in the key, depending on your plan.
Should I use the Vary header for currency or language?
Vary: Accept-Language can work, but raw header values differ a lot between browsers, which splits the cache into many copies. A cleaner option is a URL per language or currency. Cookies are harder, since many caches do not vary on them by default.
How can I test my site's prices from another country?
Use a VPN, a colleague abroad or a browser testing service, and open the same page in a clean private window. Check currency, language and the price in the cart. Repeat twice so you see both a cache MISS and a HIT.
Can FunnelGuard detect wrong prices caused by caching?
Only partly. FunnelGuard's price_consistent check looks for price consistency within a journey it runs from the EU or the US. It does not cover every country, currency or language, so you should still test other markets by hand.
Related issues
- OPS-107CDN serving stale page after deployFix guide
- OPS-108Cached page with another visitor's personal data/cartFix guide
- OPS-111Cache stripping UTM/gclid query paramsFix guide
- OPS-109Cached logged-in admin bar shown to visitorsFix guide
- OPS-110Cached form nonce expired (form rejects submissions)Fix guide
- OPS-115CDN purges failing / edge outageFix guide