Local storage

Did you know that the web browser comes with a built-in key-value database? The name of this database is local storage, and in JavaScript, we can access the localStorage object as a property of the window object. Local storage allows us to store data locally within the web browser. Local storage is per domain and protocol, meaning that pages from the same origin can access and modify shared data.

Here are some benefits of local storage:

  • It provides secure data storage
  • It has a far greater storage limit than cookies (at least 5 MB)
  • It provides low latency data access
  • It is helpful for web applications that need to operate offline (internet connection not required)
  • It can be utilized as a local cache
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.105.159