Local storage:
1. Local storage stores the data in the form of key and value
2. The data is stored for longer duration and remains in the browser unless the user deletes it explicitly, it remains even after a computer restart.
3. No way to specify the timeout period as the Cookies have.
Cookies :
1. Good for small amount of data
2. Difficult to work with JavaScript
3. All data is transferred to and from server, so bandwidth is consumed on every request
4. Can specify timeout period so that cookies data are removed from browser
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Last edited by kunalkumar; 10-13-2016 at 02:23 AM..
|