Skip to content

Commit d67df61

Browse files
committed
Add rich FAQ
1 parent 2b9f807 commit d67df61

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

_posts/2025-03-07-why-do-we-have-a-cache-control-request-header.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
layout: post
33
title: "Why Do We Have a Cache-Control Request Header?"
44
date: 2025-03-07 15:55:04
5+
last_modified_at: 2025-06-04
56
categories: Web Development
67
meta: "Learn how the Cache-Control request header works, how browsers handle refresh and hard refresh caching, and when developers should use it for realtime data and offline-first applications."
8+
faq:
9+
- question: "When should I add Cache-Control in HTTP requests?"
10+
answer: "Use it for real-time or offline-first data where freshness is critical; e.g. `no-store` or `only-if-cached`."
11+
- question: "Is `max-age=0` the same as `no-cache`?"
12+
answer: "Both force revalidation, but `no-cache` is stricter and must revalidate before reuse."
713
---
814

915
I’ve [written](/2019/03/cache-control-for-civilians/) and
@@ -277,3 +283,6 @@ stored content rather than attempting a network request that might fail.
277283
```http
278284
Cache-Control: only-if-cached
279285
```
286+
287+
Need a helping hand with your caching strategy? Schedule a [performance
288+
audit](/performance-audits/).

0 commit comments

Comments
 (0)