When building more complex JavaScript applications that run in a user’s browser it’s very useful to be able to store information in the browser, so that the information can be shared across different pages and browsing sessions.
In the recent past this would have only been possible with cookies – text files saved to a user’s computer – but the way of managing these with JavaScript was not good. Now there’s a new technology called local storage that does a similar thing, but with an easier-to-use interface.
In this article we have gathered 15 JavaScript Libraries and Tools for working with local storage, so let’s explore the list, and please feel free to share your opinion by posting a comment below.
1. Lockr
Lockr (pronounced /ˈlɒkəʳ/) is an extremely lightweight library (less than 2kb when minified), designed to facilitate how you interact with localStorage. Saving objects and arrays, numbers or other data types, accessible via a Redis-like API, heavily inspired by node_redis.
2. ISbridge
1K library for exchanging messages between tabs in a same browser. It uses the local storage as a communication channel.
3. Angular Storage
A Storage done right for AngularJS. It uses localStorage by default but if it’s not available, it uses ngCookies, and uses a caching system so that if you already have a value, it won’t get it from the store again.
4. Store
A feature-filled and friendly way to take advantage of localStorage and sessionStorage (JSON, namespacing, extensions, etc). If localStorage or sessionStorage are unavailable, they will be faked to prevent errors, but data stored will NOT persist beyond the life of the current document/page. Use the store.old.js extension to add persistent backing for the store API in older browsers.
5. Collection.js
Collection.js is small but yet powerfull local database build on top of the localstorage. Collection.js works with all modern browsers, if you need IE8 support use es5 pollyfill.
6. Lz-String
lz-string was designed to fulfill the need of storing large amounts of data in localStorage, specifically on mobile devices. localStorage being usually limited to 5MB, all you can compress is that much more data you can store.
7. Basil.js
Basil.js is described as a unified localStorage, sessionStorage, and cookie API and it includes some unique and very easy to use features. It comes under MIT license.
8. dStore
The dstore package is a data infrastructure framework, providing the tools for modelling and interacting with data collections and objects. dstore is designed to work with a variety of data storage mediums, and provide a consistent interface for accessing data across different user interface components.
9. PouchDB
PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser. PouchDB was created to help web developers build applications that work as well offline as they do online. It enables applications to store data locally while offline, then synchronize it with CouchDB and compatible servers when the application is back online, keeping the user’s data in sync no matter where they next login.
10. Loki.js
LokiJS is an in-memory database which prioritises performance over everything, LokiJS supports field indexing for faster document access and performs really well (near 500,000 ops/s on an average dev machine) on those. Its built-in DynamicView class also enables to utilize indexes on data subsets for even faster performance.
11. LocalForage
localForage is a fast and simple storage library for JavaScript. localForage improves the offline experience of your web app by using asynchronous storage (IndexedDB or WebSQL) with a simple,localStorage-like API.
12. secStore.js
secStore is simple wrapper to handle client storage mechanisms within the browser.It is named secStore.js because not only will this plug-in assist you in transparent storage & retrieval of client data, but it will optionally provide a layer of security for said data with the use of the SJCL (Stanford Javascript Crypto Libraries).
13. IScache
This is a simple library that emulates memcache functions using HTML5 localStorage, so that you can cache data on the client and associate an expiration time with each piece of data. If the localStoragelimit (~5MB) is exceeded, it tries to create space by removing the items that are closest to expiring anyway. If localStorage is not available at all in the browser, the library degrades by simply not caching and all cache requests return null.
14. Barn
Barn provides a redis like API on top of localStorage (or any other storage implementing the web storage API). Operations are atomic so even if a users closes the browser window, or and error is thrown and not handled barn keeps a consistent state.
15. MonguitoDB
Utility to perform CRUD operations over the localStorage, sessionStorage, or any object implementing the Storage Interface defined by the W3C. This library was inspired by MongoDB, and some of its functions are syntactically similar to how they are in Mongo, with some differences and limitations.