Sunday, March 31, 2013

JavaScript: The less known parts. Storage.

'JavaScript: The less known parts' chapters:
1. Bitwise Operators
2. Storage
3. Dom Mutations

Client side storage is almost as old as Internet itself. Back in the days we used cookies for this, but since Firefox 2 & Safari 4 browsers support DOM Storage techniques. We are probably all familiar with IndexedDB or deprecated WebSQL. Both of them are widely supported in almost all of the newest browsers:


Thats not all - we also have well known localStorage & sessionStorage key/value client storage system. We can simply save the value in one window:
And load it in another:

The advantage of local/session storage over IndexedDB is that we can listen to an event that fires when something has changed - we can for instance propagate those changes to all the browser cards or iframes in our application. Choose the 'result' tab in the next fiddle, go back to the first one and save something using the form.
It's helpful also in IndexedDB based apps - for example PouchDB made by Dale Harvey use localStorage events with IndexedDB data to keep everything up to date everywhere. storage

We can also use property to store data on the client side. This ancient method allows us to read and write data across pages and domains, even from outside the current origin. According to Wikipedia [HTTP COOKIE] we can store up to 32MB there (according to some sources its even around 60MB). It's also accessible even before domready event. And even if it's not really cleaver idea in times of tabbed browsing (every new tab starts with empty, it's still used as a fallback in for older browsers. More on storage:
Ajaxian: What’s in a
Cookie-less Session Variables in JavaScript
Session variables without cookies
HTML5 sessionStorage for "every" browsers

See you next Monday in the 3rd part of Javascript: The less known parts. Follow me on Twitter and stay informed about next parts!


  1. IT staff outsourcing services give backup support along with other IT services at any time of company's requirement. Apart from IT services you can rely on out sourcing services for necessary software equipments also.

  2. Thanks for your post.Under hypnosis, you can become desensitized to your fears, safely and comfortably, beginning with the most subtle unconscious cues that set them off.

    Hypnosis Hong Kong

  3. You may choose to look the other way but you can never say again that you did not know. family holidays goa india

  4. Download Instagram Videos online with Instagram Video Downloader , all you have to is to paste the Instagram video url and then click Download button and the video downloader will grab direct video link

  5. Visit us now to know Technology Science World
    Technology Science World


  6. this is very useful informative posting !
    thank you for your sharing this good informations !

    gclub casino

  7. Thank you for your post. This is excellent information.
    It is amazing and wonderful to visit your site
    gclub casino

  8. Awesome Post! Let us know more about Happy Diwali 2017 Facebook Status
    Also download latest movies PIRATES OF THE CARIBBEAN: DEAD MEN TELL NO TALES 2017
    Also Read trending Stories Modern Society
    Also Check out Latest vacancy of Government Jobs BPSC Recruitment 2017

  9. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    SAP Training in Chennai
    SAP ABAP Training in Chennai
    SAP FICO Training in Chennai


  10. This blog is having the general information. Got a creative work and this is very different one.We have to
    develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful...

    SEO Company in India
    SEO Company in chennai

  11. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.

    Microsoft Azure Training in Chennai

  12. Local sessions definitely would have more advantage than just IndexedDB because we could know the right time, when the event occurs and also about when it ends so that we could implement these change through browser cards. There are various syntax and code for every specification which is clearly given here.
    Best Anti Dandruff Shampoo

  13. Download NBA 2k17 APK is a Sports Game for Smartphone or Tablet Game.NBA 2k17 for Android is to a great degree common and countless around the world would be glad to get it without any portions.

  14. Awesome keep sharing Wonderfull post really appreciating Instagram Video

  15. This is extremely great information for these blog. And Very good work. It is very interesting to learn from to easy considered. Thank you for giving information.

    Bigdata Training in Chennai

  16. Its an awesome article. written in very creative way and it also conveys useful information.

    Selenium Training in Chennai

  17. It is really very excellent,I find all articles was amazing.Awesome way to get exert tips from everyone,not only i like that post all peoples like that post.Because of all given information was wonderful and it's very helpful for me.
    Hadoop Training in Chennai
    Data Warehousing Training in Chennai

  18. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.

    Best Linux training in Noida
    Linux Training Institute in Noida

  19. NiCe Sharing.Great Article . I like it....!
    Here Get the Father's Day Updates 2018 : Happy Fathers Day 2018 to US,UK and All over the World

  20. NiCe Sharing.Great Article . I like it....! Its too much great article Check Online All the Punjab Boards 10th Class Result 2018


  21. A great information you have shared keep it up also try this website download instagram video


  22. download facebook videos

    Thank you for sharing such a useful Information.
    It's useful for everyone

  23. very infromative data u have shared ,plz also visit this site for entertainment youtubevideos

  24. very infromative data u have shared ,plz also visit this site for entertainment youtubevideos

  25. Your post is very detailed and informative as well as very useful. Expecting more posts like this from your side and please find or refer the links to get updates relevant to latest software and technologies:
    Logistics software
    Fleet Management Software
    Manufacturing ERP
    HR Management Software
    CCTV Camera Dealers in Chennai

  26. Your post is very detailed and informative as well as very useful.

    agen sbobet online
    poker deposit pulsa
    promo agen bola

  27. Thank you for sharing your article. Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums.

    best openstack training in chennai | openstack course fees in chennai | openstack certification in chennai | openstack training in chennai velachery

  28. Netflix is a streaming media player that allows users to watch online videos, movies, TV shows etc. it streams media from the internet to your TV. Even after having such a large Entertainment service provider you may sometimes have trouble using Netflix. You do not panic our Netflix Customer Service Provider 24x7 is present for you.

    Netflix Customer Service
    Netflix Customer Service Phone Number
    Netflix toll-free Number
    Netflix customer support
    Netflix Technical Support Phone Number
    Netflix Customer support phone number
    Netflix setup

  29. I will be a frequent visitor for a long time.
    This page certainly has all the information

    judi bola tangkas

    judi tangkas

    Agen Tangkas

  30. This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.
    ipod service center in Chennai | Authorized ipod service center in Chennai | ipad service center in chennai | ipod service center in chennai | ipad service center in chennai

  31. Very good information. Its very useful for me. We need learn from real time examples and for this we choose good training institute, we need to learn from experts . So we make use of demo classes . Recently we tried java demo class of Apponix Technologies.

  32. Awesome keep sharing Wonderfull post really appreciating Instagram Video Downloader