Get started
Cloudflare speeds up your website by caching content across globally distributed data centers.
Content can be static or dynamic. Static content — such as images, CSS, and JavaScript files — is cacheable by default. Dynamic content, such as HTML pages, is not cached by default, but you can use Cache Rules to cache it.
Cloudflare caches static content based on the following factors:
- Caching levels
- File extension
- Presence of query strings
- Origin cache-control headers
- Origin headers that indicate dynamic content
- Cache rules that bypass cache on cookie
Cloudflare only caches resources within the Cloudflare data center that serve the request. Cloudflare does not cache off-site or third-party resources, or content hosted on DNS-only (unproxied) DNS records.
Discover the benefits of caching with Cloudflare's CDN and understand the default cache behavior.
- Understand what is a CDN ↗
- Understand default cache behavior
- Understand the default file types Cloudflare caches
Configure your settings to cache static HTML or cache anonymous page views of dynamic content.
- Customize Caching with Cache Rules
- Specify which resources to cache
- Understand Origin Cache Control
- Cache by device type (Enterprise only)
Include or exclude query strings, optimize cache keys, or enable Tiered Cache to improve HIT rates and reduce traffic to your origin.
- Choose a cache level
- Enable Tiered Cache with Argo
- Configure custom cache keys (Enterprise only)
- Enable Prefetch URLs (Enterprise only)
Control resources a client is allowed to load and set access permissions to allow different origins to access your origin's resources. Protect your site from web cache deception attacks while still caching static assets.
- Avoid web cache poisoning attacks
- Configure Cross-Origin Resource Sharing (CORS)
- Enable Cache Deception Armor
Some Cloudflare features modify your HTML or cached objects at the edge to enable optimizations or security protections. These alterations only affect cached copies at Cloudflare's edge and do not change your original source files. Cloudflare removes the changes when you disable the feature and purge the cache. These alterations only affect cached copies at Cloudflare's edge and do not change your original source files. The changes are removed if the feature is disabled and the cache is purged.
- Rocket Loader
- Polish
- Hotlink Protection
- Email address obfuscation
- Bot Management JavaScript Detections
Resolve common caching concerns.