10 replies
by kees_b
by promedianw edited
by zeenata583 edited
by old molases
Cookies
Has different expiration dates (both the server or client can set up expiration date)
The Client can't access the Cookies if the HttpOnly flag is true
Has SSL Support
Data are transferred on each HTTP request
4kb limit
Local Storage
Has no expiration date
Client only
Has no SSL support
Data are not transferred on each HTTP request
5 mb limit (check with the browser)
by hannahdiaz
by jhonalbert
local Storage is an implementation of the Storage Interface. It stores data with no expiration date, and gets cleared only through JavaScript, or clearing the Browser Cache / Locally Stored Data.
Cookies are primarily for reading server-side, local storage can only be read by the client-side
by wisekaren123
1.Storage size, the official statement of local storage is 5M, but the storage size of cookies is smaller and related to the browser itself (about 4000 bytes)
2.The content stored by the cookie will remain in the header of the HTTP request and will be sent to the browser with each request; however, the local storage will only remain on the client side, and the browser request process will not be sent to the server side
by thomasmills472 edited
The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session.
Cookies do not handle this case well because they are transmitted with every request.
by jakeclarke1985 edited
Cookies are smaller and send server information back with every HTTP request, while LocalStorage is larger and can hold information on the client-side.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending