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:
| 7Z | APK | AVI | AVIF | BIN | BMP |
| BZ2 | CLASS | CSS | CSV | DMG | DOC |
| DOCX | EJS | EOT | EPS | EXE | FLAC |
| GIF | GZ | ICO | ISO | JAR | JPG |
| JPEG | JS | MID | MIDI | MKV | MP3 |
| MP4 | OGG | OTF | PICT | PLS | |
| PNG | PPT | PPTX | PS | RAR | SVG |
| SVGZ | SWF | TAR | TIF | TIFF | TTF |
| WEBM | WEBP | WOFF | WOFF2 | XLS | XLSX |
| ZIP | ZST |
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-cacheCache-Control: no-storeCache-Control: private