Are there any good jquery plugins for using html 5 local storage?
Because HTML5 local storage is natively integrated into Web browsers, it is available without third-party browser plug-ins. It is described in the HTML5 specifications. Local storage is mainly used to store and retrieve data in HTML pages from the same domain.
Save the HTML to localStorage # The innerHTML property returns the HTML inside an element as a string, which makes it the perfect way for us to get and store our list. Let's automatically save a users list every time they add an item to it. You use the localStorage. setItem() method to save data to localStorage .
The local storage is a type of HTML5 offline storage that allows user string data to be saved synchronously in their browser. Information is kept in name and value pairs and not available between different browsers on the same device. Local storage can be used as an alternative to cookies.
There's no need for plugins here, since you can access it very quickly:
localStorage.setItem("key", "value");
var value = localStorage.getItem("key");
That's not to say someone won't make plugins in the future (but how would you do cross-browser support? either there's local storage or there isn't). But you don't need to wait on a plugin for anything here, you can start using it (provided the browser supports it) today.
If you want a light plugin that has compatibilty with old browsers use this:
https://github.com/artberri/jquery-html5storage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With