FrontendDeveloper.in

JavaScript question detail

What are the differences between cookie, local storage and session storage

Below are some of the differences between cookie, local storage and session storage,

FeatureCookieLocal storageSession storage
Accessed on client or server sideBoth server-side & client-side. The set-cookie HTTP response header is used by server inorder to send it to user.client-side onlyclient-side only
ExpiryManually configured using Expires optionForever until deleteduntil tab is closed
SSL supportSupportedNot supportedNot supported
Maximum data size4KB5 MB5MB
Accessible fromAny windowAny windowSame tab
Sent with requestsYesNoNo
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399