Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Caching in HTTP
Search
SJ Chou
January 13, 2014
Programming
100
0
Share
Caching in HTTP
初探 HTTP 1.1 Cache 機制,透過簡單的實驗來說明瀏覽器對於 HTPP Cache 的實作策略。
SJ Chou
January 13, 2014
More Decks by SJ Chou
See All by SJ Chou
LangChain Framework 與 RAG 實做教學
samejack
1
12
LLM RAG 擷取增強生成介紹 - 3 種 RAG/Self-RAG/CRAG 全解析
samejack
1
110
NVIDIA Omniverse Kit Introduction
samejack
1
70
用 Keras 玩 Machine Learning
samejack
1
160
2020 MLaaS 產業介紹
samejack
1
84
Linux Container Introduction
samejack
1
45
Cloud Foundry Introduction
samejack
1
73
WordPress Blog SEO 兩三事
samejack
1
84
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
samejack
1
120
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
280
Feature Toggle は捨てやすく使おう
gennei
0
400
存在論的プログラミング: 時間と存在を記述する
koriym
5
760
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.2k
おれのAgentic Coding 2026/03
tsukasagr
1
120
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
210
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.3k
Ruby and LLM Ecosystem 2nd
koic
1
1.4k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
430
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
780
20260320登壇資料
pharct
0
150
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Un-Boring Meetings
codingconduct
0
250
It's Worth the Effort
3n
188
29k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Chasing Engaging Ingredients in Design
codingconduct
0
160
From π to Pie charts
rasagy
0
160
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
350
How to Talk to Developers About Accessibility
jct
2
170
Darren the Foodie - Storyboard
khoart
PRO
3
3.1k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
640
Transcript
Caching in HTTP SJ 2016/07/25 Email:
[email protected]
Blog: http://blog.toright.com
回顧 HTTP 1.1 的設計理念 Architectural Styles and the Design of
Network-based Software Architectures (by Roy Thomas Fielding) CHAPTER 5. Representational State Transfer (REST)
HTTP Features • HTTP 1.1 設計 Cache 的目的在降低 Request 與
Full Response • 以下兩個主要的設計理念 ◦ Expiration ◦ Validation • 實作上透過 Header 讓 Server 與 Client 可以 自由定義 Cache 的方式
HTTP 1.0 與 HTTP 1.1 Caching Difference HTTP 1.0 Reponse
Cache Header ◦ Expires ◦ Pragma HTTP 1.1 Reponse Cache Header ◦ Cache-Control
介紹 HTTP 1.1 Cache-Control Header • Response Cache Header ◦
no-store 完全不 Cache ◦ no-cache 允許 Cache 但是每次都會檢查 Cache 狀態 ◦ max-age 設定要 Cache 幾秒 ◦ private Cache 只給目前使用者使用 ◦ public Cache 可共用 (HTTPS不可共用) ◦ must-revalidate 交由 Client 自行決定要不要使用 Cache • 可以混搭
如何檢查 Cache 是否有效? • 時間導向 (秒為單位) Last-Modified / If-Modified-Since •
檔案內容導向 (Hash) ETag / If-None-Match
Cache-Control: no-store
Cache-Control: no-cache
Cache-Control: max-age
Cache-Control: private
Cache-Control: public
Cache-Control: must-revalidate
Reference • HTTP 1.1 RFC 2616 - 14.9 Cache-Control •
HTTP 1.1 RFC 2616 - 13 Caching in HTTP • Architectural Styles and the Design of Network-based Software Architectures - 5 Representational State Transfer (REST)
Thanks! The End Email:
[email protected]
Blog: http://blog.toright.com