Skip to content

CDN (Content Delivery Network)

Webslice operates a global CDN that is turned on for your serverless websites by default, this speeds up page loads by serving static files from the edge.

The goal of the CDN is to speed up but not get in the way of your website, therefore Webslice will only cache static files in the CDN, no responses served by PHP will be cached, this allows us to handle invalidating the cache when a static file is updated.

You can configure the CDN caching strategy for your website in the Webslice Console under the Settings tab. There are a few different caching strategies available for your website:

Standard Caching

The Standard caching strategy only caches files with the following extensions:

7ZAPKAVIAVIFBINBMP
BZ2CLASSCSSCSVDMGDOC
DOCXEJSEOTEPSEXEFLAC
GIFGZICOISOJARJPG
JPEGJSMIDMIDIMKVMP3
MP4OGGOTFPDFPICTPLS
PNGPPTPPTXPSRARSVG
SVGZSWFTARTIFTIFFTTF
WEBMWEBPWOFFWOFF2XLSXLSX
ZIPZST

All Static Caching

All Static caching will cache all static files regardless of their extension. This works well for public facing static websites that do not require any authentication or access control.

Disabling Caching

When this strategy is enabled, no files will be cached by the CDN.

You can also use one of the following cache control headers to opt out of CDN caching for particular responses:

Cache-Control: no-cache
Cache-Control: no-store
Cache-Control: private