Log In / Register
What's the difference between cookies and sessionstorage?

Sessionstorage is a temporary holder within the browser that lasts from page to page but not across tabs or browsers or sessions or domains. When you close the tab or browser the information goes away.

Cookies hold data that can not be read by other domains.

Cookies sessionstorage
Storage Permanent file on your device Temporary file on your device (Note 1)
Across Domains No No
Across Browsers No No
Across Tabs Yes No
Across sessions (Note 2) Yes and No (Note 3) No
Susceptible to Cross Site Scripting Yes Yes
Accessible by Browser Yes Yes
Accessible by Server Yes No

Note 1: sessionstorage is a temporary file on your device, however if your browsers terminates without cleaning up properly (crashes or device reboot), the file might remain on your device.

Note 2: a session, here, means for as long as the tab or browser is opened

Note 3: each value stored in a cookie is given an expiry date and time, which means it can expire as soon as you close the tab or browser or leave this domain to go to another domain


 
Home Log In Register FAQ Challenge Phishing Privacy Policy 3rdKey Cookies Advertising Cookies ©copyright 1997-2022