Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Brady Eidson
Safari and WebKit Engineer
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Store entire application offline Automated atomic updates You specify a resource manifest A little nonmandatory API
26
27
28
29
30
31
32
33
Server must know the text/cache-manifest mime type Specify manifest in HTML Resources not in the manifest fail to load Server-side changes to manifest trigger an update Update process is automatic
34
Now that my app works offline how about all the data it creates?
35
36
37
Standard interface for storing items of data Items are key/value pairs Origin-based security Various implementations of the interface
38
SessionStorage for per-window data LocalStorage for global, persistent data Settings and SecureSettings in Safari extensions
39
40
41
42
43
44
45
46
47
Use window.localStorage for global, persistent data Different ways to store and retrieve the same items
48
Now that I can store the simple stuff how about a little more oomph?
49
50
51
52
53
54
Real-world SQL
55
Tables
56
Rows of Data
57
Indexes
58
Triggers
59
Transactions
Window
61
62
Database
63
Database
64
Database
65
Database .transaction(callbackFunction)
66
Database .transaction(callbackFunction)
67
Database .transaction(callbackFunction)
68
SQLTransaction
69
SQLTransaction
70
SQLTransaction
71
SQLTransaction
72
73
SQL queries available directly from JavaScript Handle complex, relational data in the browser Performance superior to the cloud
74
75
76
77
More Information
Vicki Murley
Safari Technologies Evangelist vicki@apple.com
78
Labs
Safari Extensions Lab HTML5 Offline Storage Lab Safari Open Lab
Internet and Web Lab A Thursday 2:00PM Internet and Web Lab B Thursday 4:30PM Internet and Web Lab A Friday 9:00AM
79
Q&A
80
81
82