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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
SJ Chou
January 13, 2014
Programming
0
98
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
10
LLM RAG 擷取增強生成介紹 - 3 種 RAG/Self-RAG/CRAG 全解析
samejack
1
100
NVIDIA Omniverse Kit Introduction
samejack
1
67
用 Keras 玩 Machine Learning
samejack
1
160
2020 MLaaS 產業介紹
samejack
1
79
Linux Container Introduction
samejack
1
44
Cloud Foundry Introduction
samejack
1
71
WordPress Blog SEO 兩三事
samejack
1
80
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
samejack
1
120
Other Decks in Programming
See All in Programming
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
3
1.3k
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
160
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
170
How to stabilize UI tests using XCTest
akkeylab
0
110
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
250
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
540
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
5
390
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
1
170
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
890
15年目のiOSアプリを1から作り直す技術
teakun
1
620
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
420
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
140
Why Our Code Smells
bkeepers
PRO
340
58k
For a Future-Friendly Web
brad_frost
183
10k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
200
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
How GitHub (no longer) Works
holman
316
140k
Being A Developer After 40
akosma
91
590k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
140
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