Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Caching in HTTP
Search
SJ Chou
January 13, 2014
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
31
LLM RAG 擷取增強生成介紹 - 3 種 RAG/Self-RAG/CRAG 全解析
samejack
1
160
NVIDIA Omniverse Kit Introduction
samejack
1
120
用 Keras 玩 Machine Learning
samejack
1
190
2020 MLaaS 產業介紹
samejack
1
120
Linux Container Introduction
samejack
1
68
Cloud Foundry Introduction
samejack
1
130
WordPress Blog SEO 兩三事
samejack
1
110
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
samejack
1
130
Other Decks in Programming
See All in Programming
Verilogで学ぶCPU自作入門.pdf
uyuki234
8
3.9k
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
330
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
410
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
440
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
160
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
100
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
590
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
400
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
220
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
410
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
560
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
sira's awesome portfolio website redesign presentation
elsirapls
0
440
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
250
Agile that works and the tools we love
rasmusluckow
331
22k
Bash Introduction
62gerente
615
220k
Faster Mobile Websites
deanohume
310
32k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Designing for Performance
lara
611
70k
Scaling GitHub
holman
464
140k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
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