How does the Fasterize cache work?

Modified on Fri, 18 Jul at 4:03 PM

Summary


Introduction

Caching is a key technique to significantly improve website performance by reducing loading times.

However, implementing caching becomes more complex when dealing with dynamic pages that include personalized elements directly within the HTML code. This can include the user's name, product recommendations, geolocated content, personalized pricing, or information related to sessions or browsing history.

These variations can make each page unique, complicating caching strategies. The challenge is to identify and isolate these variable zones in order to cache the rest of the page, which is common to all users.

At Fasterize, we’ve developed several advanced techniques over the years to address these issues.
This article walks you through the various caching solutions we offer.


Two complementary cache layers

Fasterize relies on two complementary cache layers to maximize performance:

  1. CDN cache, which by default caches all static assets (images, CSS, JS, fonts, etc.) and serves them as close as possible to the end user, with the option to also manage HTML cache.
  2. Fasterize engine cache, integrated into the platform core, handling HTML (static or dynamic) and static resource caching.

Why two layers?

  • Faster delivery via the CDN, reducing latency and server load.
  • Advanced HTML optimization in the Fasterize engine, with strategies tailored to content (Smart Cache, Cookie Less Cache, Dynamic Cache...)
In short: the CDN handles fast delivery, while the Fasterize engine applies optimization and HTML caching intelligence.


Static resources cache

Caching static files is essential. It applies to assets such as CSS, JavaScript, images, fonts, etc.

The Fasterize engine respects the Cache-Control HTTP header set by your origin server. If it’s missing or incorrect, you can override it from the console by setting a TTL.

The engine allows granular configuration to cache resources in the browser, a CDN, or both.

Where to configure in the console?

Console > Configuration > Static resources cache

Good to know: If you opt for CDN cache, static resources can be served directly from it, further improving response times.

Option: URL Versioning in the "Assets" tab

Versioning static assets is key to long-term cache management.

It helps prevent issues with outdated files (like old CSS not updating), but can reduce cache hit rates by generating unique URLs.

If you already use effective versioning, you don’t need to enable this option in Fasterize.

Principle: A version parameter is added to file URLs (e.g., style.css?v=12345).
When cache is purged in Fasterize, a new URL version is generated automatically, forcing all intermediate caches (CDN, browser, proxies…) to update.

Advantage: No need to manually manage long expirations or force browser refreshes—changing the URL invalidates the old cache.


HTML page cache (static & dynamic)

Fasterize enables caching of HTML pages, whether they are non-personalized (static) or partially personalized (dynamic).

The goal is to maximize reuse of optimized HTML while respecting user-specific variations.


1. Static HTML page cache

Some HTML pages are identical for all users (FAQ, legal notices, T&Cs, etc.) and can be fully cached.

Where to configure in the console?

Console > Configuration > Full Page caching


HTML cache segmentation

To ensure each user receives a page adapted to their context (device, bot, etc.), Fasterize applies automatic HTML cache classification.

This mechanism determines the number of cache variations stored per URL. You can choose from three modes:

1. Responsive Mode

  • 2 cache versions:
    • Version 1: Desktop, Mobile, Tablet
    • Version 2: Bots (including mobile bots)

Ideal for responsive sites where HTML is the same across devices.

2. Adaptive Mode

  • 4 cache versions:
    • Desktop
    • Mobile
    • Tablet
    • Bot

Recommended when your site delivers different HTML based on the device.

3. Adaptive – Bot First Mode

  • Same 4 cache versions as above, but:
    • Mobile bots are classified as bots, not as mobile

Useful if you serve specific HTML to crawlers.


Where to configure in the console?

Console > Configuration > Page cache > Cache variation tab


Dynamic HTML page cache

Some HTML pages contain personalized elements (user account, recommendations, welcome message, dynamic pricing, etc.). Though partially dynamic, much of the content is often shared across users.

Two findings from our experience:

  1. Dynamic pages are often only partially dynamic: only a portion of HTML changes.
  2. Dynamic pages aren't always dynamic: e.g., a product page doesn't change unless the user logs in.

Based on this, we’ve developed three complementary strategies for dynamic pages:


a. SmartCache

SmartCache allows caching of any HTML page, even if partially personalized.

Principle: the page is split into:

  • Static zones cached in the HTML cache,
  • Dynamic zones fetched via Ajax.

Two-step rendering:

  1. The browser loads the HTML structure from cache.
  2. Dynamic blocks are fetched separately via Ajax.

Automatic refreshing

When a user triggers a SmartCache Ajax request:

  1. Fasterize intercepts the request.
  2. Fetches dynamic data from the origin.
  3. Returns the response to the browser.
  4. And refreshes the fragment’s cache.

Where to configure SmartCache?

Console > Configuration > Page cache

Add a SmartCache fragment using a CSS selector.


b. Cookie Less Cache

Principle: serve a cached page if the user has no cookies (anonymous visitor).

This cache enables fast responses without contacting the origin server.

Advantage: No setup needed: it activates automatically.

Where to configure?

Console > Configuration > Page cache > Cache variation tab


To enable: “Anonymous page caching”


c. Dynamic Cache

Principle: Fasterize temporarily stores an optimized version of a dynamic HTML page for 1 minute. If an identical request arrives within that time, it’s served without reprocessing.

Benefits:

  • Reduced optimization time (60 ms saved on average)
  • Lower load on the engine

Where to configure in the console?

Console > Configuration > HTML > Dynamic Cache tab


Which type of cache should you enable?

The method you choose depends on the type of page and its level of personalization.

Here’s our recommended priority order for enabling caching strategies:

  1. Standard cache
    For fully static pages and resources.
  2. SmartCache
    For pages with identifiable dynamic zones.
  3. Cookie Less Cache
    For dynamic pages shown to anonymous users (no cookies).
  4. Dynamic Cache
    Automatically enabled if none of the above apply.

This approach ensures excellent cache coverage while maintaining effective personalization for your users.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article