Skip to content

Knowledgebase

Protecting cart, checkout and account pages from page caching

wordpress, performance

Exclude personalised WooCommerce responses from inappropriate full-page caching so customers see their own cart, checkout and account data. Review every cache layer, including plugins, the hosting server and any CDN.

01 Identify the dynamic routes

Record the actual assigned Cart, Checkout and My Account URLs, including translated or customised paths. Include order-payment and order-received endpoints and other personalised flows used by your extensions. A rule that only excludes an old default slug may miss the current page.

02 Configure supported exclusions

  1. Review the caching provider's current WooCommerce integration guidance.
  2. Confirm that cart, checkout and account routes bypass full-page caching.
  3. Verify appropriate session-cookie handling so customers with a WooCommerce cart are not served another visitor's cached state.
  4. Review dynamic WooCommerce AJAX and Store API requests rather than applying a broad cache-everything rule.
  5. Purge the affected cached responses after correcting the configuration.
  6. Test with two separate browser sessions and different cart contents.

Do I need to disable all caching?

No. Public catalogue pages and static assets can often benefit from properly configured caching. Persistent object caching is also different from storing a whole personalised HTML response. Use targeted, supported rules so performance improvements do not compromise cart correctness or private account data.

Why is my cart still wrong after changing the plugin?

A server cache or CDN may continue serving a cached response. Browser storage and another optimisation plugin can also affect the test. Inspect response headers and the actual cache status at each layer, then purge only the relevant scope.

03 Verify isolation and business behaviour

In separate sessions, add different products, change quantities and sign in with separate test accounts. Confirm account pages never show another customer's details. Test coupons, shipping recalculation and a sandbox payment on staging. Review checkout scripts if a combined or deferred asset setting causes stale totals despite correct page exclusions.

04 Maintain the rules

Recheck exclusions when page slugs, languages, checkout formats or CDN settings change. If private data appears across sessions, stop the affected caching behaviour and preserve evidence for investigation. A fast checkout is useful only when its totals, identity and payment state remain correct for the current customer.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution