Skip to content

Commit 4c9bf14

Browse files
committed
Add CDN-specific info notes and prepare v0.0.2 release
Add contextual info notes for CloudFront and Fastly that explain their multi-layer caching behavior: - CloudFront: Explains that a MISS at the edge doesn't necessarily mean the origin was hit, as Origin Shield may have served the request. - Fastly: Shows a visual diagram mapping X-Cache values (e.g., "MISS, HIT, MISS") to each layer in the tiered architecture (Origin → Shield POP → Edge POP). Also includes: - Styling for info diagrams with dark mode support - Removed monospace font from row values, changed to break-word - Simplified popup.js code with fewer branches - Headers displayed in Title-Case - Updated changelog for v0.0.2 release
1 parent 7baeecf commit 4c9bf14

4 files changed

Lines changed: 191 additions & 352 deletions

File tree

CF Cache Status/CF Cache Status Extension/Resources/popup.css

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ body {
173173
font-size: 13px;
174174
color: #8e8e93;
175175
text-align: right;
176-
word-break: break-all;
176+
word-break: break-word;
177177
margin-left: 16px;
178-
font-family: "SF Mono", Monaco, "Courier New", monospace;
179178
}
180179

181180
/* =============================================================================
@@ -238,6 +237,25 @@ body {
238237
text-decoration: underline;
239238
}
240239

240+
.info-diagram {
241+
font-family: "SF Mono", Menlo, Monaco, monospace;
242+
font-size: 11px;
243+
color: #6e6e73;
244+
background: #f2f2f7;
245+
border-radius: 6px;
246+
padding: 10px 12px;
247+
margin: 8px 0;
248+
text-align: left;
249+
line-height: 1.4;
250+
}
251+
252+
@media (prefers-color-scheme: dark) {
253+
.info-diagram {
254+
background: #3a3a3c;
255+
color: #a1a1a6;
256+
}
257+
}
258+
241259
/* =============================================================================
242260
Utilities
243261
============================================================================= */

CF Cache Status/CF Cache Status Extension/Resources/popup.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,24 @@
3636
<span id="page-url"></span>
3737
</div>
3838

39-
<div id="info-section" class="section hidden">
39+
<div id="cloudfront-info" class="section hidden">
4040
<div class="section-header">Note</div>
4141
<div class="info-card">
4242
<p class="info-note">A "MISS" at the edge doesn't always mean the request reached your origin. CloudFront may serve from <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html" target="_blank">Origin Shield</a> (intermediate cache) but still report MISS from the edge's perspective.</p>
4343
</div>
4444
</div>
45+
46+
<div id="fastly-info" class="section hidden">
47+
<div class="section-header">Note</div>
48+
<div class="info-card">
49+
<p class="info-note">Multiple values in X-Cache show cache status at each layer in Fastly's <a href="https://www.fastly.com/documentation/guides/concepts/edge-state/cache/cache-freshness/" target="_blank">tiered architecture</a>:</p>
50+
<pre class="info-diagram">X-Cache: MISS, HIT, MISS
51+
│ │ │
52+
│ │ └── Edge POP (closest to you)
53+
│ └─────── Shield POP (intermediate cache)
54+
└───────────── Origin (your server)</pre>
55+
</div>
56+
</div>
4557
</div>
4658
<script src="popup.js"></script>
4759
</body>

0 commit comments

Comments
 (0)