Cloudflare's CDN caches your website on servers around the world so visitors load your site from a location close to them. Here is how to get the most out of it.
Enable Cloudflare caching
- Log in to https://dash.cloudflare.com and select your domain.
- Go to Caching → Configuration.
- Set Caching Level to Standard.
- Set Browser Cache TTL to 4 hours or longer.
Enable Auto Minify
- Go to Speed → Optimization → Content Optimization.
- Enable Auto Minify for JavaScript, CSS, and HTML.
Enable Brotli compression
- In the same Speed → Optimization section, enable Brotli. This compresses files before sending them to visitors.
Purge the cache after updates
After making changes to your website, you may need to clear the Cloudflare cache so visitors see the latest version:
- Go to Caching → Configuration.
- Click Purge Everything.
Development mode (temporary cache bypass)
While editing your site, enable Development Mode to bypass the cache temporarily:
- Go to Caching → Configuration.
- Enable Development Mode. It automatically turns off after 3 hours.