window sessionStorage vs localStorage

They are almost the same.

However if you want to store info beyond a tab, which means even after a tab is closed, then use localStorage

Opening a page in a new tab or window will cause a new session to be initiated.

That means that info stored in sessionStorage can’t share between tabs.

more details could be found here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s