We need to kill off the localStorage API

It is a failure of the web, browser vendors and developers that we are in this situation, but we need to stop advocating for and building examples that use the LocalStorage API’s, it is simply not a scalable API and the more we build for it the harder it will be for us to ween ourselves off it. LocalStorage has poor querying capabilities, terrible performance, small storage in many browsers, crazily inconsistent eventing and a nasty habit of locking.


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan

<div><span style="font-family: Arial,sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255,255,255);">It is a failure of the web, browser vendors and developers that we are in this situation, but w</span><span style="background-color: rgb(255,255,255); font-family: Arial,sans-serif; font-size: 13px; line-height: 18px;">e need to stop advocating for and building examples that use the LocalStorage API's, it is simply not a scalable API and the more we build for it the harder it will be for us to ween ourselves off it.  </span></div> <p /><div><span style="background-color: rgb(255,255,255); font-family: Arial,sans-serif; font-size: 13px; line-height: 18px;">LocalStorage has poor querying capabilities, terrible performance, small storage in many browsers, crazily inconsistent eventing and a nasty habit of locking.  It's saving grace is simple semantics and "browser support".</span></div> <p /><div>Client-side and offline web-apps are not a reality with localStorage, and if we keep pushing it, we are never going to be in a situation where we have a compelling offline or client-side story.</div><p /><div>We need to bite the bullet, move on and start building compelling apps, examples and demos build around IndexedDB, that is our only future (I am still aggrieved that the web dropped WebSQL, it was simple and familiar) and we need to do this by stopping to support localStorage. Period.<p /> <div><span style="font-family: Arial,sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255,255,255);">To this effect, I have taken the BackboneJS example in TodoMVC (by <a href="https://github.com/addyosmani/todomvc">Addy Osmani</a></span><span style="font-family: Arial,sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255,255,255);">) and <a href="https://github.com/PaulKinlan/todomvc/commit/39205e06c4553ceb0c455fbf7d1c69a801c281bb">added IndexedDB support</a></span><span style="line-height: 18px;"> u</span><span style="font-family: Arial,sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255,255,255);">sing the Backbone JS adapter b</span>y <a href="https://github.com/superfeedr/indexeddb-backbonejs-adapter">Julien Genestoux</a>.<span style="font-family: Arial,sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255,255,255);"> I quickly removed the LocalStorage interface, and in a couple of lines of config change I had IndexedDB support in.</span></div> </div>


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan


Print Share Comment Cite Upload Translate Updates
APA

Paul Kinlan | Sciencx (2012-02-28T00:00:00+00:00) We need to kill off the localStorage API. Retrieved from https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/

MLA
" » We need to kill off the localStorage API." Paul Kinlan | Sciencx - Tuesday February 28, 2012, https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/
HARVARD
Paul Kinlan | Sciencx Tuesday February 28, 2012 » We need to kill off the localStorage API., viewed ,<https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/>
VANCOUVER
Paul Kinlan | Sciencx - » We need to kill off the localStorage API. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/
CHICAGO
" » We need to kill off the localStorage API." Paul Kinlan | Sciencx - Accessed . https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/
IEEE
" » We need to kill off the localStorage API." Paul Kinlan | Sciencx [Online]. Available: https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/. [Accessed: ]
rf:citation
» We need to kill off the localStorage API | Paul Kinlan | Sciencx | https://www.scien.cx/2012/02/28/we-need-to-kill-off-the-localstorage-api/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.