Website Caching: What You Can Speed Up and What You Shouldn't Cache

Caching lets your site reuse a response it has already prepared instead of building the page from scratch. That works well for public content, but it's dangerous if personal data gets stored along with it. Before you speed up a site, work out what's the same for everyone and what changes for each visitor.

A public article and a customer account are different cases

The text of an article or a service page is usually the same for every guest. An account, a cart and the results of personal actions can differ. You can't blindly serve them from a shared copy.

Even a public page can contain dynamic form data. You either need to refresh it separately and correctly, or pick a different caching method. A fast page with a broken lead form is not a successful optimization.

A public article has a shared fast copy, while the private account stays in its own personal zone.
A public article has a shared fast copy, while the private account stays in its own personal zone.

Plan when a cached copy goes stale

Editing text, prices, menus or a post's publication status should refresh the affected pages. On a blog, it's not just the new article that matters, but also the article list and recommendations. Make sure a scheduled post doesn't show up early.

Cache can live on several levels: the application, the server, a CDN or proxy, and the browser. This also affects your choice of hosting. Without a map of these levels, it's hard to explain why some visitors see your changes and others still see the old version.

An editor changes the content, then the stale cache card is refreshed; the dependency between versions is shown.
An editor changes the content, then the stale cache card is refreshed; the dependency between versions is shown.

Test speed and correctness together

First find out why your website is slow. Compare the first and repeat visit, a guest and a logged-in user, a page before and after editing. Test forms and simultaneous requests. Exceptions should be explicit, not depend on some random cookie.

Technical support that includes speed optimization should rely on these checks. If caching needs its own server configuration, discuss server solutions with data freshness in mind, not just the top score in a single test.

Two tests running at once: a stopwatch measures speed, a reference layout checks that the content is current.
Two tests running at once: a stopwatch measures speed, a reference layout checks that the content is current.
← All articles

06 / LET'S GET ACQUAINTED

TELL US
WHAT YOUR
BUSINESS NEEDS

Describe the task. Together we'll
work out the next step.

Or message us on Telegram ↗
What are you interested in?

We'll reply to the contact you provide.