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

[网络] 14. HTML5 的离线储存怎么使用,工作原理能不能解释一下 #951

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

Comments

@qiilee
Copy link
Member

qiilee commented Feb 24, 2020

答案:

如何使用:只要在在页面头部加入 mainfest 的属性就行了。

<!DOCTYPE html>
<html manifest="cache.manifest"></html>

工作原理:HTML5 的离线存储是基于一个新建的.appcache 文件的缓存机制(不是存储技术),通过这个文件上的解析清单离线存储资源,这些资源就像 cookie 一样被存储下来。当无网时,浏览器会通过被离线存储的数据进行展示

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