• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Client-side Storage 
 

Client-side Storage 

on

  • 402 views

Intruduction to sessionStorage, localStorage &localDatabase. ...

Intruduction to sessionStorage, localStorage &localDatabase.

Example
http://dev.augentier.info/InterfaceEntwicklung/smashing_offline/

more information
http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Introduction/Introduction.html

Statistics

Views

Total Views
402
Views on SlideShare
402
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Client-side Storage  Client-side Storage  Presentation Transcript

    • Client-side Storage
    • Cookiessetcookie(name,Lorem Ipsum); document.cookie = name=Lorem Ipsum;echo $_COOKIE[name]; alert(document.cookie);PHP JavaScript
    • Sessionssession_start();$_SESSION[name] = Lorem Ipsum;echo $_SESSION[name];PHP
    • sessionStoragesessionStorage.setItem(name,Lorem Ipsum);alert(sessionStorage.getItem(name));JavaScript
    • localStoragelocalStorage.setItem(name,Lorem Ipsum);alert(localStorage.getItem(name));JavaScript
    • BeispielTic Tac Toe
    • localDatabase
    • openDatabasevar db = openDatabase(shortName,1.0,displayName, 10000);
    • create tabledb.transaction( function(transaction){ transaction.executeSql(CREATE TABLE foobar (id, name)); })
    • insert intodb.transaction( function(transaction){ transaction.executeSql(INSERT INTO foobar (id, name) VALUES ("1", "Maik")); })
    • SQLCREATE TABLE foobar ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(200) NOT NULL, description TEXT NOT NULL)INSERT INTO foobar ( name, description) VALUES ( Maik, Maik lebt in Berlin und ist 24 Jahre alt.)UPDATE foobar SET name = Torben WHERE name == Maik
    • SQLSELECT name FROM foobarSELECT * FROM foobarSELECT * FROM foobar WHERE name == TorbenSELECT * FROM foobar WHERE name LIKE torben ORDER BY id DESC LIMIT 5
    • SQLite Documentationwww.sqlite.org/lang.html
    • handle resultsdb.transaction( function(transaction){ transaction.executeSql(SELECT * FROM foobar,[ ], function (transaction, results){ for(var i=0; i<results.rows.length; i++){ console.log(results.rows.item(i)); } }) })
    • Referencedeveloper.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Introduction/Introduction.html
    • BeispielText-Editor
    • BeispielSmashing Magazine Offline App
    • cache.manifestCACHE MANIFEST# Cache manifest version 0.2CACHE:style.cssNETWORK:*FALLBACK:images/ images/fallback.png
    • geschafft. danke. fragen?