CDN for SvelteKit
SvelteKit prerender is better with a global cache.
SvelteKit apps mix prerendered pages, hashed client files and optional SSR. A single adapter origin should not be the only copy of that output.
Cache _app assets with long TTLs. Cache prerendered and anonymous SSR pages at Cloud CDN. Bypass form actions and session-specific routes.
Why teams use Aptranet
How it works with Aptranet
Cloud CDN caches and accelerates eligible content on 210+ points of presence, with Origin Shield when the origin must stay out of the way.
Client assets at every PoP
Hashed _app files are served with 30 ms average latency.
Prerendered HTML at the edge
Static SvelteKit routes are an ideal CDN cache.
Actions stay on the origin
Form actions and authenticated load functions bypass cache.
How to set it up
Validate your setup before production changes.
Create your Cloud CDN distribution, test delivery on its Aptranet hostname, then update production DNS when the configuration is ready.
- 1Connect the SvelteKit adapter origin
Pull Node, static or other adapter output over HTTPS.
- 2Cache _app and prerendered routes
Long TTL for hashed files. Purgeable TTL for HTML.
- 3Bypass actions and private loads
Do not cache POST actions or cookie-varying pages.
- 4Purge on deploy
Invalidate HTML after each production adapter deploy.
Outcomes
What changes once the hostname is on Aptranet.
- SvelteKit assets are cached globally
- Prerendered pages live at the edge
- Form actions remain dynamic
- Deploys purge HTML
Keep reading
Related pages
More CDN use cases on the same Cloud CDN footprint.
Frequently asked questions
Yes. Static output is a natural Cloud CDN origin.
Only public GET endpoints. Mutations and authenticated JSON must bypass cache.
Pick one canonical URL shape and cache that. Avoid duplicating the same page under two keys.
Yes when many edges miss the same SSR route at once after a deploy or TTL expiry.