Client Side Storage

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

2 comments

Comments 1 - 2 of 2 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

1 Favorite & 1 Event

Client Side Storage - Presentation Transcript

  1. more space… more opportunities…
  2. 97% Web browsers support it, yet 0.001% of Web sites use it ?
  3. Client Side Storage
    • There are more options than cookies!
    • More widespread support for local storage than currently recognised
  4.  
  5. Each to Their Own
    • Gears plugin
    • WHATWG DB
    • WHATWG Global/Session Storage
    • DHTML userData Behaviour
    • Flash cookies
  6. Gears
    • SQLite powered DB backend
    • no size limit on capacity (in the beta)
    • full text search
    • very low install base
  7. Gears
    • var db = google.gears.factory.create('beta.database');
    • db.open('database-test');
    • db.execute('CREATE TABLE IF NOT EXISTS Test
    • (Phrase text, Timestamp int)');
    • db.execute('INSERT INTO Test VALUES (?, ?)‘,
    • ['Monkey!', new Date().getTime()]);
    • var rs = db.execute(
    • 'SELECT * FROM Test ORDER BY Timestamp DESC');
    • while (rs.isValidRow()) {
    • alert(rs.field(0) + '@' + rs.field(1));
    • rs.next();
    • }
    • rs.close();
  8. WHATWG DB
    • SQLite powered DB backend
    • Supported by Safari 3.1+, WebKit
    • Asynchronous execution API
  9. WHATWG DB
    • var db = openDatabase("Test", "1.0", "HTML5 Database API example", 200000);
    • db.transaction(function (tx) {
    • tx.executeSql('CREATE TABLE IF NOT EXISTS Test
    • (Phrase text, Timestamp int)');
    • tx.executeSql('INSERT INTO Test VALUES (?, ?)',
    • ['Monkey!', new Date().getTime()]);
    • tx.executeSql('SELECT * FROM Test ORDER BY Timestamp DESC', [], function(tx, result) {
    • for (var i = 0; i < result.rows.length; ++i) { var row = result.rows.item(i);
    • alert(row['Phrase'] + '@' + row['Timestamp']);
    • }
    • }, function(tx, error) {
    • alert('Failed accessing database - ' + error.message);
    • });
    • });
  10. WHATWG Global Storage
    • FF 2.0+, IE 8.0
    • globalStorage and sessionStorage
    • Events are fired when keys are modified
    • up to 5MB per accessible bucket (e.g. www.meebo.com's bucket includes meebo.com)
  11. WHATWG Global Storage
  12. WHATWG Global Storage
    • function onStorage (e) {
    • e = e || event;
    • alert('Storage event fired for domain: ' + event.domain);
    • }
    • if (document.addEventListnener) {
    • document.addEventListener('storage', onStorage, false);
    • } else {
    • document.attachEvent('onstorage', onStorage);
    • }
    • var storage = globalStorage[location.hostname];
    • storage.user = 'paul';
  13. userData DHTML Behavior
    • IE 5.5+
    • Stores data in an XML document
    • 128KB per document and 1MB per domain
    • Uses DHTML Behaviors
  14. userData DHTML Behavior
    • var el = document.createElement('div');
    • el.addBehavior('#default#userData');
    • el.load('data');
    • el.setAttribute('user', 'paul');
    • el.save('data');
  15. Flash Cookies
    • 100KB of space and you can prompt the user to ask for more
    • You’ll need to include a SWF wrapper and use asynchronous calls
  16. but when can we use these next generation APIs…
  17. Browser Support
    • We tracked the support from our users on
    • meebo.com on Tuesday this week and…
    • 87% of users have flash
    • 74% of users have native client storage (whatwgdb, globalStorage, userData)
    • 97% of users have either flash or native storage
    • … only 96% of our users have cookies!
  18. Thanks! Paul Sowden [email_address]

Paul SowdenPaul Sowden, 2 years ago

custom

3172 views, 1 favs, 2 embeds more stats

An overview of the APIs available on the client for more

More Info

© All Rights Reserved

Go to text version
  • Total Views 3172
    • 3165 on SlideShare
    • 7 from embeds
  • Comments 2
  • Favorites 1
  • Downloads 29
Most viewed embeds
  • 6 views on http://www.ultrasaurus.com
  • 1 views on http://192.168.10.100

more

All embeds
  • 6 views on http://www.ultrasaurus.com
  • 1 views on http://192.168.10.100

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories

Groups / Events