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
0
97
Caching in HTTP
初探 HTTP 1.1 Cache 機制,透過簡單的實驗來說明瀏覽器對於 HTPP Cache 的實作策略。
SJ Chou
January 13, 2014
Tweet
Share
More Decks by SJ Chou
See All by SJ Chou
LangChain Framework 與 RAG 實做教學
samejack
1
8
LLM RAG 擷取增強生成介紹 - 3 種 RAG/Self-RAG/CRAG 全解析
samejack
1
98
NVIDIA Omniverse Kit Introduction
samejack
1
62
用 Keras 玩 Machine Learning
samejack
1
160
2020 MLaaS 產業介紹
samejack
1
76
Linux Container Introduction
samejack
1
42
Cloud Foundry Introduction
samejack
1
70
WordPress Blog SEO 兩三事
samejack
1
79
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
samejack
1
120
Other Decks in Programming
See All in Programming
AgentCoreとHuman in the Loop
har1101
5
220
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
Patterns of Patterns
denyspoltorak
0
1.4k
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
160
AI & Enginnering
codelynx
0
110
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
900
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
300
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
63
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
Amusing Abliteration
ianozsvald
0
96
Color Theory Basics | Prateek | Gurzu
gurzu
0
190
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Faster Mobile Websites
deanohume
310
31k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
190
The Spectacular Lies of Maps
axbom
PRO
1
520
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
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