Mastering Backbone.js by Abiee Echamea

Mastering Backbone.js by Abiee Echamea

Author:Abiee Echamea [Echamea, Abiee]
Language: eng
Format: azw3, pdf
Publisher: Packt Publishing
Published: 2016-01-14T16:00:00+00:00


To get the stored object back, you can use the JSON.parse() inverse function that converts a string into an object:

var data = localStorage.getItem('object'); varobj = JSON.parse(data);

This is how you can store and retrieve objects from localStorage. You will need to encode and decode objects as you go. It is not recommended to store big objects in localStorage due to the heavy use of JSON functions; every time you encode or decode an object, the JavaScript thread will block that object.

Backbone and localStorage



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.