What are the benefits of using sessionStorage?

Just wondering what are the actual benefits of using HTML5 sessionStorage when storing HTML content for use in a Javascript carousel?

Is performance related? Loading time? Bandwidth?

+3
source share
3 answers

Yes, you will use less bandwidth, it will be better for performance, because you can store information in your browser up to 5 MB . This is much more than a cookie.

For example, to install an item in a repository that you can do:

sessionStorage.setItem("name1", "value1");

and get the item

sessionStorage.getItem("name1");

SessionStorage refers to each subdomain / domain.

+7

. sessionStorage , cookie, .

, ( ) ajax- , , .

( , ) ( ).

+1

(, , ), , , ( , ). , , https-. ( , , ).

0

Source: https://habr.com/ru/post/1754880/


All Articles