M
M
Monty Python2018-02-02 14:48:04
Browsers
Monty Python, 2018-02-02 14:48:04

Does sessionStorage store data for just one tab or for the entire domain?

When you close the tab, the data in sessionStorage is cleared by itself. In the case when several tabs with the same domain were opened, then on the contrary, will nothing be deleted (until the last tab of the same domain is closed), or sessionStorage for each tab is different?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Solntsev Daniil, 2018-02-03
@Austin1

SessionStorage for each tab is different. The availability of data in sessionStorage is limited by the window. If you open two tabs with the same document, then these two tabs will own different sessionStorage.
For long-term storage of data between tabs, use localStorage.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question