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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
15
LLM RAG 擷取增強生成介紹 - 3 種 RAG/Self-RAG/CRAG 全解析
samejack
1
110
NVIDIA Omniverse Kit Introduction
samejack
1
78
用 Keras 玩 Machine Learning
samejack
1
160
2020 MLaaS 產業介紹
samejack
1
89
Linux Container Introduction
samejack
1
48
Cloud Foundry Introduction
samejack
1
79
WordPress Blog SEO 兩三事
samejack
1
86
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
samejack
1
120
Other Decks in Programming
See All in Programming
Making the RBS Parser Faster
soutaro
0
610
実用!Hono RPC2026
yodaka
2
280
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
150
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
870
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
250
Back to the roots of date
jinroq
0
550
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
140
GoogleCloudとterraform完全に理解した
terisuke
1
170
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
300
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
4
1.3k
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
130
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1.1k
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
A designer walks into a library…
pauljervisheath
211
24k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
A Soul's Torment
seathinner
6
2.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Context Engineering - Making Every Token Count
addyosmani
9
850
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
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