How It Works: Caching + AJAX Pricing
A plain-English explanation of how Super Speedy AJAX Prices lets you fully cache your shop pages without showing the wrong prices. (For the developer-level internals, see Architecture Overview.)
The conflict: fast pages vs. correct prices
Full-page caching makes a page fast by saving the finished HTML and serving that same copy to everyone — no database, no PHP, just instant HTML.
WooCommerce prices, though, often depend on who’s looking: their country (geolocation), their tax/VAT situation, dynamic-pricing or member discounts, the active currency. A single saved copy of the page can’t be correct for everyone at once.
So stores usually pick one:
- Cache the pages → fast, but prices can be wrong for some visitors.
- Don’t cache the pages → always correct, but slow.
This plugin lets you have both.
The trick: show a placeholder, then fill in the real price
Think of it like a printed catalogue with a blank price sticker that gets filled in the moment a specific customer picks it up:
- When the page is cached, each price is wrapped in a placeholder. The placeholder still shows the last-known (cached) price, so the page looks complete and the layout doesn’t jump.
- When a real visitor opens that cached page, a small script collects every product on the page and asks your server, in one single request, “what’s the correct price for this visitor for all of these products?”
- The server replies with prices calculated fresh for that visitor — full geolocation, tax, discounts, currency — and the script swaps them into the placeholders in one smooth step.
The visitor gets a lightning-fast cached page and prices that are correct for them.
Why there’s a brief flash of the old price
Because step 1 shows the cached price and step 3 swaps in the live one, you may notice a price change a fraction of a second after the page loads. That’s the plugin doing its job. By default it dims the cached price and cross-fades to the live one (the Dimmed mode) so there’s no blank gap and nothing on the page jumps around. If you’d rather not show the cached number at all during that moment, switch to Spinner or Loading text – see Display While Prices Load.
One request, not one per product
A shop page with 24 products doesn’t make 24 requests — it makes one batched request for all 24. That’s what keeps the approach fast. If new products appear (for example via infinite scroll), only the new ones are fetched, not the whole page again.
One batched request covers the whole page, so a 24-product grid costs the same one round-trip as a single product. The per-visitor work stays flat as your catalogue grows.
Stock can work the same way
The same mechanism can optionally keep stock correct too — “5 in stock”, “Out of stock”, and the Add-to-Cart button — so a sold-out product on a cached page updates to the live state. See Live Stock Refresh.
What you need for it to work
Two things:
- A full-page cache that caches your shop/product/category pages (a caching plugin or a CDN/edge cache).
- That cache must not cache the plugin’s AJAX request, and must still bypass cart/checkout/account pages.
- A full-page cache serving your shop, product and category pages
- That cache set to never cache the plugin’s price request
- Cart, checkout and account pages still bypassing the cache
Set up correctly (see Caching Plugin Configuration), your catalogue is fully cached and every visitor still sees their own correct prices.
In one sentence
Cache the page for speed, then quietly fetch and drop in each visitor’s real prices after it loads — so you never have to choose between fast and correct.

Comments