250 likes | 517 Views
BEFORE HTML5. CookiesFlash StorageInternet Explorer UserDataGoogle GearsDojo Storage.... STORAGE OPTIONS IN HTML5. Web StoragelocalStoragesessionStorage. STORAGE OPTIONS IN HTML5. Web StoragelocalStoragesessionStorageWeb SQL Database. STORAGE OPTIONS IN HTML5. Web StoragelocalStorages
E N D
1. STORAGE EXPECT THE UNEXPECTED
2. BEFORE HTML5 Cookies
Flash Storage
Internet Explorer UserData
Google Gears
Dojo Storage
...
3. STORAGE OPTIONS IN HTML5 Web Storage
localStorage
sessionStorage
4. STORAGE OPTIONS IN HTML5 Web Storage
localStorage
sessionStorage
Web SQL Database
5. STORAGE OPTIONS IN HTML5 Web Storage
localStorage
sessionStorage
Web SQL Database
IndexedDB (aka. WebSimpleDB)
6. STORAGE OPTIONS IN HTML5 Web Storage
localStorage
sessionStorage
Web SQL Database
IndexedDB (aka. WebSimpleDB)
... and cookies
7. WHY? ?
8. WHY? Keep yourself organized
...instant retrieval of structured data
9. WHY? Keep yourself organized
...instant retrieval of structured data
Reduce # of HTTP requests
...bandwidth is expensive!
10. WHY? Keep yourself organized
...instant retrieval of structured data
Reduce # of HTTP requests
...bandwidth is expensive!
Put processing (sorting, filtering, etc.) on client
...performance is a big deal!
11. WEB STORAGE localStorage:
Key / value pairs - hash table
Persistent on page reloads
Avoids HTTP overhead of cookies
Great for storing user preferences
12. WEB STORAGE sessionStorage, same as localStorage but...
13. WEB STORAGE sessionStorage, same as localStorage but...
Lasts as long as browser is open
14. WEB STORAGE sessionStorage, same as localStorage but...
Lasts as long as browser is open
Survives page reloads and restores
15. WEB STORAGE sessionStorage, same as localStorage but...
Lasts as long as browser is open
Survives page reloads and restores
Opening page in new window or tab starts new session
16. WEB STORAGE sessionStorage, same as localStorage but...
Lasts as long as browser is open
Survives page reloads and restores
Opening page in new window or tab starts new session
Great for sensitive data (e.g. banking sessions)
17. WEB SQL DATABASE Client-side SQL database
Asynchronous & Synchronous API
Basically wrapper around SQLite
Put processing (sorting, filtering, etc.) on client
18. WEB SQL DATABASE