Define Web storage in HTML5

In this article, I will explain Web storage in HTML5.
  • 1957

Web Storage in HTML5


  • Web storage currently provides a better programmatic interface than cookies because it exposes an associative array data model.

  • Web Storage is a new HTML5 API offering important benefits over traditional cookies.

HTML5 introduces two mechanisms, similar to HTTP session cookies, for storing structured data on the client side and to overcome following drawbacks.

  • Cookies, data stored in Web Storage remains on the client and is never transferred to the server.

  • Cookies are limited to about 4 KB of data . Not enough to store required data.

  • Cookies, in contrast, are sent back and forth between the browser and the server with each HTTP request.

Web Storage solves both of these problems. First, the data never leaves the browser. Second, it allows you to store a larger amount of data.

Type Of Web Storage

There are three types of Web Storage

  • Session Web Storage

  • Local Web Storage

  • Delete Web Storage

The Web storage objects use the same interface, which means that anything you can do with local Storage, you can also do with sessionStorage and vice versa.

Further Readings

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.