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
Ryan McGeary
February 05, 2012
Technology
1.1k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HTML5 Application Caching
Ryan McGeary
February 05, 2012
More Decks by Ryan McGeary
See All by Ryan McGeary
Cloud Services You Should Be Using To Build Your Startup
rmm5t
1
720
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
750
CoffeeScript
rmm5t
5
720
One Man Lightning Talks
rmm5t
2
440
Do Your Commit Messages Suck?
rmm5t
5
2k
Other Decks in Technology
See All in Technology
AmazonRoute 53ではじめてのドメイン取得!HTTPS化までの道のりを整理してみた
usanchuu
3
130
EventBridge Connection
_kensh
5
690
攻撃者視点で考えるDetection Engineering
cryptopeg
0
640
データサイエンスを価値につなげるプロジェクト設計 〜 DS一年目が現場で得た気づき 〜
ysd113
1
120
「速く作る」から「正しく作る」へ ─ 生成AI時代の開発フロー改革の ロードマップと実行 ─
starfish719
0
9.7k
手塩にかけりゃいいってもんじゃない
ming_ayami
0
240
On-behalf-of Token exchange with AgentCore Identity
hironobuiga
2
140
LLMにもCAP定理があるという話
harukasakihara
0
280
就職⽀援サービスにおけるキャリアアドバイザーのシフトスケジューリング
recruitengineers
PRO
1
130
Agentic Web
dynamis
1
200
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
370
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
19
6.4k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.9k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
Leo the Paperboy
mayatellez
7
1.8k
The Pragmatic Product Professional
lauravandoore
37
7.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
Skip the Path - Find Your Career Trail
mkilby
1
140
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
Building an army of robots
kneath
306
46k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
140
Paper Plane
katiecoart
PRO
1
51k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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