Static vs dynamic content on a CDN

What is static, what is dynamic, and which dynamic responses Cloud CDN can still cache: anonymous HTML, ISR pages and public API GETs.

Static means the bytes are the same for every anonymous visitor. Dynamic means the origin ran code. A surprising amount of dynamic output is still shareable — and that is the traffic a CDN should keep.

Static is easy on purpose

Hashed JS, CSS, fonts, images and built HTML from Hugo or Astro are static. Long TTL, purge on deploy for unhashed HTML, done.

If that is your whole site, Cloud CDN is a global files edge with TLS and HTTP/3. See CDN for static sites.

Dynamic does not mean uncacheable

A WordPress page, a Magento category and a Next.js SSR route are generated, then often identical for the next thousand anonymous readers. Cache that HTML. Bypass the editor, cart and draft mode.

Cloud CDN is built to accelerate dynamic application traffic, not only files on disk.

Personalised HTML is the third bucket

If the response includes a user name, cart count or A/B variant chosen by cookie, it is not a public cache object. Bypass it. Cache the assets around it.

Trying to cache personalised HTML with a clever cookie key usually creates unusable entries and leaking risk.

APIs follow the same rule

Public catalogue JSON can be cached with a TTL and purge. Authorization-varying JSON cannot. GraphQL POSTs usually cannot.

See CDN for APIs for path-level practice.

Frequently Asked Questions

Not if the token is unique per session and embedded in the HTML. Cache the shell only when it is identical for everyone.

Both. The origin regenerates, then the result is static until the next revalidate. The CDN can store that result globally.

Yes when it is anonymous and you can purge or TTL it to match publishing. Assets-only CDNs leave TTFB on the table.

Put this on Cloud CDN.

Get started with our Management Console in less than 2 minutes, or connect with an expert to supercharge your business today.