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
HTML5 Application Caching
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ryan McGeary
February 05, 2012
Technology
4
1.1k
HTML5 Application Caching
Ryan McGeary
February 05, 2012
Tweet
Share
More Decks by Ryan McGeary
See All by Ryan McGeary
Cloud Services You Should Be Using To Build Your Startup
rmm5t
1
710
Asynchronous Collaboration
rmm5t
5
1.3k
How We Use MongoDB at BusyConf (Take Two!)
rmm5t
2
170
Just In Time Inventory with Spree
rmm5t
3
1.8k
How We Use MongoDB at BusyConf
rmm5t
2
740
CoffeeScript
rmm5t
5
710
One Man Lightning Talks
rmm5t
2
430
Do Your Commit Messages Suck?
rmm5t
5
1.9k
Other Decks in Technology
See All in Technology
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
1
370
AIとともに歩む情報セキュリティ / Information Security with AI
kanny
4
2.8k
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
320
toCプロダクトにおけるAI機能開発のしくじりと学び / ai-product-failures-and-learnings
rince
6
4.7k
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
210
全員が「作り手」になる。職能の壁を溶かすプロトタイプ開発。
hokuo
1
630
「全社導入」は結果。1人の熱狂が組織に伝播したmikanのn8n活用
sota_mikami
0
600
AI時代、1年目エンジニアの悩み
jin4
1
130
「AIでできますか?」から「Agentを作ってみました」へ ~「理論上わかる」と「やってみる」の隔たりを埋める方法
applism118
14
8.9k
【NGK2026S】日本株のシステムトレードに入門してみた
kazuhitotakahashi
0
240
人はいかにして 確率的な挙動を 受け入れていくのか
vaaaaanquish
5
3.2k
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
2
450
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
5.8k
How to build a perfect <img>
jonoalderson
1
4.9k
Side Projects
sachag
455
43k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
91
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
GraphQLとの向き合い方2022年版
quramy
50
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
260
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Language of Interfaces
destraynor
162
26k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
How to make the Groovebox
asonas
2
1.9k
Transcript
HTML5 Application Caching There are only two hard things in
Computer Science: cache invalidation and naming things. -- Phil Karlton Ryan McGeary http://ryan.mcgeary.org @rmm5t
diveintohtml5.info
Browser Support
Cache Manifest <!DOCTYPE HTML> <html manifest="/mobile.manifest"> <body> ... </body> </html>
text/cache-manifest
CACHE Sections CACHE MANIFEST http://www.google-analytics.com/ga.js /favicon.ico /javascripts/application.js /stylesheets/screen.css /data.json
NETWORK Sections CACHE MANIFEST NETWORK: * CACHE: http://www.google-analytics.com/ga.js /favicon.ico /javascripts/application.js
/stylesheets/screen.css /data.json
FALLBACK Sections CACHE MANIFEST FALLBACK: / /offline.html NETWORK: * CACHE:
http://www.google-analytics.com/ga.js /favicon.ico
Expiring The Cache CACHE MANIFEST # Updated: <%= something.updated_at %>
# Released: <%= application_released_at %> NETWORK: * CACHE: # ...
window.applicationCache swapCache() checking downloading progress cached error updateready already cached?
NO YES updated manifest? noupdate NO YES
window.applicationCache.status 0: window.applicationCache. UNCACHED 1: window.applicationCache. IDLE 2: window.applicationCache. CHECKING
3: window.applicationCache. DOWNLOADING 4: window.applicationCache. UPDATEREADY 5: window.applicationCache. OBSOLETE
Debugging Tips about:about
Debugging Tips https://gist.github.com/1714753
Debugging Tips or Use:
Gotchas! #1 The manifest is downloaded twice during a sync.
Gotchas! #2 Beware of swapCache
Gotchas! #3 Make sure your manifest file isn’t cached.
DEMO Let’s play some music.
Ryan McGeary ryan.mcgeary.org @rmm5t
[email protected]
McGeary Consulting Group