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

cookies,sessionStorage,LocalStorage区别 #45

Open
lovelmh13 opened this issue Jul 25, 2020 · 0 comments
Open

cookies,sessionStorage,LocalStorage区别 #45

lovelmh13 opened this issue Jul 25, 2020 · 0 comments

Comments

@lovelmh13
Copy link
Owner

浏览器是否会主动携带 存储大小 有效期 作用域
cookie 同源的http请求会(都向A 站发起请求) 4kb 默认浏览器关闭后消失,但是可以设置有效期时间 同源窗口共享
sessionStorage 不会 5m 当标签页关闭 同源且只在当前标签页
localStorage 不会 5m 永久,除非手删 同源窗口共享

注:文档源通过协议、主机名以及端口三者来确定

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

No branches or pull requests

1 participant