CDN and Caching
Cloudflare's CDN (Content Delivery Network) is one of the largest in the world, spanning 330+ cities globally. It stores copies of your website's static content at edge locations closest to your visitors, dramatically reducing latency and offloading traffic from your origin server.
Why This Matters
A CDN can reduce your page load time by 50β80% for static assets. Cloudflare's CDN is free and active by default on every proxied domain.
How Cloudflare CDN Worksβ
flowchart TD
subgraph Visitors["Global Visitors"]
US["πΊπΈ US Visitor"]
EU["πͺπΊ EU Visitor"]
AS["π―π΅ Asia Visitor"]
end
subgraph Edge["Cloudflare Edge Network (330+ PoPs)"]
US_POP["US PoP\n(Cached Content)"]
EU_POP["EU PoP\n(Cached Content)"]
AS_POP["Asia PoP\n(Cached Content)"]
end
ORIGIN["Your Origin Server\n(Single Location)"]
US --> US_POP
EU --> EU_POP
AS --> AS_POP
US_POP -->|Cache Miss| ORIGIN
EU_POP -->|Cache Miss| ORIGIN
AS_POP -->|Cache Miss| ORIGIN
style ORIGIN fill:#6b7280,color:#fff,stroke:#4b5563
style US_POP fill:#f6821f,color:#fff,stroke:#e5711e
style EU_POP fill:#f6821f,color:#fff,stroke:#e5711e
style AS_POP fill:#f6821f,color:#fff,stroke:#e5711e
What You Will Learnβ
| Lesson | What It Covers |
|---|---|
| CDN and Cache Fundamentals | How the CDN works, what gets cached, Cache-Control headers, and cache purging |
| Speed Brain | Prefetch acceleration for faster page navigation |
| Cache Rules | Modern, granular caching policies β per path, cookie, header, or country (10 free) |
| Page Rules (Legacy) | The older per-URL rule system, common patterns, and full migration guide |
| Tiered Cache | Hierarchical caching that shields your origin and increases cache HIT ratios globally |
| Cache Reserve | Persistent R2-backed cache layer that eliminates evictions for long-tail content (paid) |
| Cache Configuration | Zone-wide settings: Caching Level, Browser Cache TTL, Purge, Dev Mode, Always Online, and more |
Prerequisitesβ
- Domain added to Cloudflare with proxied DNS records (Module 1)
- Basic understanding of HTTP headers