A Safari extension that displays CDN cache status (HIT/MISS) for the current page with detailed header information.
Download the latest release from GitHub Releases.
After downloading, unzip and move the app to your Applications folder. On first launch, open Safari → Settings → Extensions and enable Cache Status.
- Toolbar Badge — Cache status (HIT/MISS) visible at a glance
- Detailed Popup — View all cache-related HTTP headers
- Edge Location Mapping — Translates CDN POP codes (e.g.,
FRA56) to city names (e.g.,Frankfurt, DE) - Multi-CDN Support — Works with Cloudflare, CloudFront, Fastly, Akamai, Bunny CDN, Varnish, and more
- Dark Mode — Automatic light/dark theme support
| CDN | Detection Headers | Status Header |
|---|---|---|
| Cloudflare | cf-cache-status, cf-ray |
cf-cache-status |
| CloudFront | x-amz-cf-id, x-amz-cf-pop |
x-cache |
| Fastly | x-served-by, x-timer |
x-cache |
| Akamai | x-akamai-request-id |
x-cache |
| Bunny CDN | cdn-cache, cdn-pullzone |
cdn-cache |
| Varnish | x-varnish |
x-cache |
| Generic | x-cache |
x-cache |
Most CDNs use x-cache: HIT from... or x-cache: MISS from..., so the generic detection works for many unlisted CDNs as well.
| Status | Badge | Color | Meaning |
|---|---|---|---|
| HIT | HIT |
🟢 Green | Served from CDN cache |
| MISS | MISS |
🔴 Red | Fetched from origin server |
| EXPIRED | EXP |
🟠 Orange | Cache expired, refetched from origin |
| STALE | STL |
🟠 Orange | Serving stale content |
| REVALIDATED | REV |
🟠 Orange | Cache revalidated with origin |
| REFRESH | REF |
🟠 Orange | Cache refreshed from origin |
| BYPASS | BYP |
⚫ Gray | Cache bypassed |
| DYNAMIC | DYN |
⚫ Gray | Dynamic content, not cached |
- macOS with Xcode installed
- Safari 14+ (for Web Extension support)
-
Open the project in Xcode:
open "CF Cache Status/CF Cache Status.xcodeproj" -
Select your development team in Signing & Capabilities
-
Build and run (Cmd+R)
-
Enable the extension:
- Open Safari → Settings → Extensions
- Check Cache Status
During development, enable unsigned extensions:
- Open Safari
- Go to Safari → Settings → Advanced
- Check Show Develop menu in menu bar
- Go to Develop → Allow Unsigned Extensions
Note: This setting resets each time Safari is quit.
Run the CDN detection test suite:
just testThe project uses Just for build automation:
just # List all commands
just build-dev # Build for development (unsigned)
just build-release # Build release (unsigned, for testing)
just clean # Clean build artifacts
just xcode # Open project in XcodeSee RELEASE.md for the full release guide covering:
- Direct distribution (GitHub) with notarization
- Mac App Store submission
CF Cache Status/
├── CF Cache Status/ # macOS container app (SwiftUI)
│ ├── CacheStatusApp.swift
│ ├── ContentView.swift
│ └── Assets.xcassets/
└── CF Cache Status Extension/ # Safari Web Extension
├── content.js # Performance metrics collection
└── Resources/
├── manifest.json # Extension configuration
├── constants.js # Shared CDN detection rules
├── background.js # Header capture & badge updates
├── popup.html/js/css # Popup UI
└── images/
scripts/ # Release automation
tests/ # CDN detection tests
Justfile # Build commands
| Permission | Purpose |
|---|---|
webRequest |
Read HTTP response headers |
webNavigation |
Detect page navigations |
activeTab |
Access current tab information |
<all_urls> |
Monitor requests to all websites |
- Navigation Detection — When you navigate to a page,
webNavigation.onBeforeNavigatemarks the tab as pending - Header Capture —
webRequest.onHeadersReceivedcaptures response headers for the main document only - CDN Detection — Headers are analyzed to identify the CDN provider
- Status Parsing — Cache status is extracted from CDN-specific headers
- Badge Update — Toolbar badge is updated with status text
- Popup Display — Clicking the icon shows detailed header information
MIT
