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
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
24
LLM RAG 擷取增強生成介紹 - 3 種 RAG/Self-RAG/CRAG 全解析
samejack
1
140
NVIDIA Omniverse Kit Introduction
samejack
1
110
用 Keras 玩 Machine Learning
samejack
1
180
2020 MLaaS 產業介紹
samejack
1
110
Linux Container Introduction
samejack
1
63
Cloud Foundry Introduction
samejack
1
110
WordPress Blog SEO 兩三事
samejack
1
92
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
samejack
1
130
Other Decks in Programming
See All in Programming
仕様駆動開発の消費期限
watany
20
8.6k
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
550
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
Go 1.27 における memory allocation の高速化
andpad
0
210
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
プロポーザルを書いてもらう
pvcresin
0
550
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
210
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
150
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
370
Building AI with AI
inesmontani
PRO
1
1.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Skip the Path - Find Your Career Trail
mkilby
1
180
Chasing Engaging Ingredients in Design
codingconduct
0
270
Agile that works and the tools we love
rasmusluckow
331
22k
The SEO Collaboration Effect
kristinabergwall1
1
520
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
490
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
540
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
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