CDN for SPAs

Deliver single-page applications with Aptranet Cloud CDN: hashed bundles at 210+ PoPs, HTML purge on deploy and dynamic APIs on the origin.

210+Points of presence worldwide
200+ TbpsNetwork capacity
30 msAverage latency worldwide
85%Average cache hit ratio

CDN for SPAs

The SPA shell is static. Treat it that way.

SPAs are a small set of static files plus APIs. Hosting the shell in one region makes every new session pay that latency before the app even boots.

Cache hashed bundles with long TTLs. Serve index.html from Cloud CDN with purge on deploy. Keep APIs and auth on the origin.

Why teams use Aptranet

What CDN for SPAs looks like on this network.

Cloud CDN caches and accelerates eligible content on 210+ points of presence, with Origin Shield when the origin must stay out of the way.

Boot from a nearby PoP

JS, CSS and fonts load with 30 ms average worldwide latency.

Deploy = purge the shell

index.html picks up new hashed filenames as soon as CI purges it.

APIs remain the app origin

Auth and JSON stay dynamic. The CDN is for the shell and public assets.

How to set it up

A cutover you can validate before DNS moves.

Create the Cloud CDN configuration, prove it on an Aptranet hostname, then point production DNS when the path looks correct.

  1. 1
    Host the production SPA build

    Any HTTPS origin that serves the bundled files.

  2. 2
    Long-cache hashed assets

    Fingerprinted files rarely need purge.

  3. 3
    Purge index.html on release

    Add purge to the SPA deploy pipeline.

  4. 4
    Fallback unknown paths to the shell

    Configure origin or hosting rules so client routes serve index.html.

Outcomes

What changes once the hostname is on Aptranet.

  • SPA bundles are global
  • HTML shells update on deploy
  • APIs stay on the origin
  • Client-side routes still boot from cache

Frequently Asked Questions

Yes. See the dedicated framework pages for bundler-specific notes.

Prefer build-time config in hashed files. Runtime config JSON can be cached with a short TTL.

Yes. Cache prerendered HTML like any static page and purge on deploy.

Cache the worker file carefully. Purge or version it when the worker must update immediately.

Put CDN for SPAs on the Aptranet edge.

Get started in the Management Console, or talk through origin, DNS and cutover with Aptranet.