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:


localStorage

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.

window.name storage

We can also use window.name 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 window.name), it's still used as a fallback in for older browsers. More on window.name storage:
Ajaxian: What’s in a window.name?
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!

70 comments:

  1. 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

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

    ReplyDelete
  3. Visit us now to know Education Left TK
    Education Left TK

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

    ReplyDelete
  5. 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

    ReplyDelete
  6. 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

    ReplyDelete

  7. 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

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

    Microsoft Azure Training in Chennai

    ReplyDelete
  9. 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

    ReplyDelete
  10. 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.

    ReplyDelete
  11. Your post is very detailed and informative as well as very useful.

    agen sbobet online
    poker deposit pulsa
    promo agen bola

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

    judi bola tangkas

    judi tangkas

    Agen Tangkas

    ReplyDelete
  13. Situs Dominoqq Online Taurusqq merupakan Alternatif Situs Dominoqq Online Terbaru, Terbaik dan Terpercaya Terpercaya di Indonesia. Alternatif Situs Dominoqq mengeluarkan Game Terbaru " Perang Baccarat " Yang pastinya tidak Kalah Seru dengan Game BandarQ maupun Alternatif Dominoqq
    loh .. Daftar dan mainkan Sekarang Juga hanya di Alternatif Dominoqq Online Paling Hoki

    ReplyDelete
  14. Situs Dominoqq Online Alternatif TERBAIK INDONESIA TAURUSQQ - 100% TANPA ROBOT. - GAME BARU PERANG BACCARAT * Bonus Cashback hingga 0,5% setiap harinya * Bonus Referral 20% seumur hidup * Deposit PULSA / OVO / GOPAY / ALFAMART / INDOMART / Link AJA, dll

    Kini Situs Dominoqq Online Alternatif
    menghadirkan permainan kartu terbaru " PERANG BACCARAT" , permainan seru dengan winrate yang tinggi dan banyak di mainkan oleh para pecinta judi alternatif poker online.
    Yuk segera daftar dan raih kemenangan Anda sekarang juga bersama Alternatif Situs Poker Online Terpercaya

    ReplyDelete
  15. Joker123 Online gambling has become more popular in today’s era of high technology. People are tending to create an account and enjoy their games while sitting at home instead of going to the casino. There are several online casinos that are offering many interesting and adventures fish games for their customers and one of those online casinos is Fish Arcades. This post aims to expand your knowledge about fish games that Fish Arcades online casino offers. For more information:

    ReplyDelete
  16. This is excellent information. It is amazing and wonderful to visit your site. Thanks for sharing this information,this is useful to me... Fashion Designer Boutique in Mumbai

    ReplyDelete
  17. Excellent site. Plenty of helpful information here. I am sending it to a few buddies ans additionally sharing in delicious. And certainly, thank you in your effort!

    AnyTrans Crack

    Crack Software

    Pc License Keys

    ReplyDelete
  18. Excellent post. I was checking continuously this weblog and I’m impressed!I was seeking this certain info for a long time. Thank you and good luck.
    Parallels Desktop Crack

    Crack Software

    Crack Software

    ReplyDelete
  19. Emblix Academy – Digital marketing institute in KPHB, we address all major and minor aspects required for any student’s advancement in digital marketing. Clutch USA named our Digital Marketing Institute the best SEO firm.

    The future of digital marketing is promising and full of possibilities.

    As a result, skilled digital marketers who can keep up with the rising demand are in high order.
    In the Emblix Academy Digital marketing institute in KPHB, you will learn about all the major and minor modules of digital marketing, from Search engine marketing to Social Media Marketing and almost all Tools used for Digital Marketing.
    One stop place for all Digital Marketing courses! Emblix Academy is a Team of dedicated Professionals with 12years of experience in various Digital Platforms. We assure to provide the best Digital Marketing courses to enhance your Career.
    Certifications

    • Search Advertising
    • Display Advertising
    • Analytics Certification
    • Hubspot Certification
    • Bing Certification
    • Twitter Certification
    • Facebook Certification



    https://emblixacademy.com/

    ReplyDelete

  20. Comprehensive experience of association with 100+ corporates globally. Highly exclusive and bespoke training problems starting from the entry-level and varying to leadership levels. We are providing corporate digital marketing training in Hyderabad for the last many years and have created a significant presence as a corporate digital marketing training company.

    Our Way of Corporate Training

    Over the last few years, the evolution of the internet and its applications has reported an immense adaption amongst the people. The digital transformation has just created an upside change in the way the businesses used to operate earlier. It has fundamentally shifted the focus of companies towards new and improved ways of operating the business. In this new era of digitization, any business that denies going with this trend may get disrupted within the next few years. The corporate digital marketing training in Hyderabad has helped many companies and business ventures to upscale their business and help them achieve exponential growth. Our training model is strategically designed and developed to inhibit businesses get the most profound and right amount of knowledge that helps them to upscale their business. We intend to provide any business the source of training that helps them to make a profitable source of revenue with the help of our training.

    So let’s get a brief insight into our role and the strategies that we focus upon to upscale any business. We work on a 5 step methodology that is quite simple but extremely effective in creating a digital presence for the company.
    Website URL: https://www.emblixsolutions.com/corporate-digital-marketing-training-in-hyderabad/

    ReplyDelete
  21. Thank you for Sharing Nice Article!!!!
    1CroreProject Center delivering Usefull Projects for engineering college Student projects We provide high quality in Chennai.
    advance security based projects chennai

    ReplyDelete
  22. eading it. Thank you for sharing your knowledge and insights.

    I’m curious to know more about your experience with IndexedDB and WebSQL. How do you choose between them? What are the advantages and disadvantages of each one?

    By the way, I’m a digital marketing enthusiast and I came across a website called Digital Shout that offers a range of services to help businesses grow online. They have a team of experts in SEO, PPC, social media, website design, and more. They also offer a free website assessment report that can help you improve your website performance. Have you heard of them? If not, you should check them out. They seem to have a lot of happy clients

    ReplyDelete
  23. Well-written information. Very impressive and to the point
    Have a look at my new blog
    Navicat Premium Crack 2023

    ReplyDelete