Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[网络] 39.本地存储(Local Storage )和 cookies(储存在用户本地终端上的数据)之间的区别是什么? #976

Open
qiilee opened this issue Feb 24, 2020 · 0 comments

Comments

@qiilee
Copy link
Member

qiilee commented Feb 24, 2020

答案:

Cookies:服务器和客户端都可以访问;大小只有 4KB 左右;有有效期,过期后将会删除;

本地存储:只有本地浏览器端可访问数据,服务器不能访问本地存储直到故意通过 POST 或者 GET 的通道发送到服务器;每个域 5MB;没有过期数据,它将保留知道用户从浏览器清除或者使用 Javascript 代码移除

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant