Question

I am not a hardcodre web -developer but I do rememebr being able to use the session variables in web-programming from Classic ASP to .NET. I was reading t=some article on HTML5 and they were bragging about code.Session variable as a new and great feature.

That made me wonder that session variable have been around for quite while so why does HTML5 say that code.SessionStorage the "NEW" thing that they have?

Is there anything that HTML5 doing in a different way? Is there anything that I am missing?

Was it helpful?

Solution

HTML 5 SessionStorage stores the data on the client.

It avoids having to round trip it to the server every time it changes or needs to be read (this gives performance improvements and is usable in off-line web applications).

OTHER TIPS

Generally speaking session storage allows an easier and comfortable handling compared to cookies:

  • better key/value handling
  • there are situations where the session lifetime is not enough
  • separation of location and storage scope: global, local and session storage
  • standardisation web storage: one interface definition for all kind of storages/implementations
  • it is cookie independant: clearing the cookies will not clear the storage :-)
  • is saved on the client side

Mozilla Developer Network DOM Storage Guide says:

DOM Storage is useful because no good browser-only methods exist for persisting reasonable amounts of data for any period of time. Browser cookies have limited capacity and provide no support for organizing persisted data, and other methods (such as Flash Local Storage) require an external plugin.

yes html5 gives the session storage... if your are typing something and suddenly PC, laptop or anything else shut down this will keep your working safe and start that procedure from where you left. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top