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

[html] 第224天 关于缓存你了解多少? #1565

Open
haizhilin2013 opened this issue Nov 25, 2019 · 2 comments
Open

[html] 第224天 关于缓存你了解多少? #1565

haizhilin2013 opened this issue Nov 25, 2019 · 2 comments
Labels
html html

Comments

@haizhilin2013
Copy link
Collaborator

第224天 关于缓存你了解多少?

我也要出题

@haizhilin2013 haizhilin2013 added the html html label Nov 25, 2019
@censek
Copy link

censek commented Apr 7, 2020

  • cookie:判断用户是否登录过网站,以便实现下次自动登录或记住密码;保存事件信息等。
  • localstorage:敏感账号一次性登录;单页面用的较多(sessionStorage 可以保证打开页面时 sessionStorage 的数据为空)。
  • sessionstorage:常用于长期登录(判断用户是否已登录),适合长期保存在本地的数据。

@jianmofeng
Copy link

HTTP缓存机制
强缓存:浏览器直接从本地缓存获取数据,不与服务器进行交互
协商缓存:浏览器发送请求到服务器,服务器判断是否可以使用本地缓存

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

No branches or pull requests

3 participants