Permalink
Browse files

No commit message

  • Loading branch information...
boazsender committed Jun 7, 2011
1 parent 9f52234 commit 55acd3d54808630cf6c46c042eea15ee019aad80
Showing with 11 additions and 0 deletions.
  1. +11 −0 Session-Storage.md
View
@@ -0,0 +1,11 @@
+Session storage is a key value store that allows you to persist serialized objects in [[JSON]] format for a single user session. Session storage persists until the user closes the browser window running your program. Session storage is similar to [[Local Storage]] which behaves the same way, but persists until the user clears their browsing data in the browser settings.
+
+##Usage:
+ var myJSONString = JSON.stringify({
+ propery: 'myfavevalue',
+ anotherProp: ['my', 'fave', 'array', 'of', 'strings']
+ });
+
+ window.localStorage.setItem( 'myData', myJSONString );
+
+ window.localStorage.getItem( 'myData' ) //returns myJSONString

0 comments on commit 55acd3d

Please sign in to comment.