-
A cookie is a website to indicate the user identity and data stored on the user's local terminal (Client Side) are (usually encrypted)
-
cookie data always carries (even if not required) at http request homologous, the record will be passed back and forth between the browser and the server
-
sessionStorage
AndlocalStorage
does not automatically send data to a server, save only in the local -
Storage size:
- cookie data size can not exceed 4k
sessionStorage
AndlocalStorage
although there are storage size limit, but much larger than the cookie, you can reach 5M or greater
-
There Time:
localStorage
To store persistent data, after the browser is closed automatically deleted unless the data is not lost datasessionStorage
Data is automatically deleted after the current browser window is closed- Valid until the expiration date cookie cookie settings, even if the window or browser is closed
What is the difference between cookies, sessionStorage and localStorage?
Guess you like
Origin www.cnblogs.com/r-mp/p/11293735.html
Ranking