Back to Documentation
Domains
CDN Setup
Your content is automatically served from 300+ edge locations worldwide. Learn how our global CDN works.
1Automatic CDN
Every Berican Labs site includes a global CDN:
- 300+ edge locations: Content served from nearest server
- Automatic caching: Static assets cached at the edge
- Smart routing: Requests routed to fastest server
- DDoS protection: Built-in protection at the edge
No configuration needed - CDN is enabled by default on all plans.
2What Gets Cached
The CDN automatically caches:
- Images (jpg, png, gif, svg, webp, ico)
- Stylesheets (css)
- JavaScript files (js)
- Fonts (woff, woff2, ttf, otf)
- Static HTML pages
- PDFs and documents
Dynamic API routes and server-rendered pages are not cached by default.
3Cache Control
Control caching behavior with headers:
# berican.json
{
"headers": [
{
"source": "/static/(.*)",
"headers": [{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}]
},
{
"source": "/api/(.*)",
"headers": [{
"key": "Cache-Control",
"value": "no-store"
}]
}
]
}
4Purge Cache
Clear cached content when needed:
- Go to Site Settings > Edge & CDN
- Click "Purge Cache"
- Choose to purge all or specific paths
- Cache is cleared globally within seconds
Deployments automatically purge the cache for changed files.
5Performance Tips
Maximize CDN performance:
- Use immutable URLs: Include hashes in filenames for permanent caching
- Optimize images: Use WebP format and appropriate sizes
- Enable compression: Gzip/Brotli enabled automatically
- Minimize requests: Bundle CSS/JS where possible
Result: Sub-second load times across Kenya and worldwide!