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部分 —— 一名【合格】前端工程师的自检清单答案整理 #8

Open
akeymo opened this issue Jan 6, 2020 · 0 comments

Comments

@akeymo
Copy link
Owner

akeymo commented Jan 6, 2020

HTML

元信息类标签(head、title、meta)的使用目的和配置方法

head标签

  • 用来定义文档的头部,它是所有头部元素的容器,在<head>标签中的元素可以饮用脚本,指示浏览器在哪里找到样式表、提供元信息等
  • <head>标签内可使用标签:<base><link><meta><script><style><title>

title标签

  • 定义文档的标题。当把文档加入用户的链接列表或者收藏夹或书签列表时,标题将成为该文档链接的默认名称
  • <head>标签中唯一要求包含的东西

meta

  • 提供有关页面的元信息,比如针对搜索引擎和更新频度的描述和关键词

HTML5离线缓存原理

HTML5引入cache manifest文件来解决离线问题。
manifest是一个后缀名为.manifest的文件,在文件中定义了需要缓存的文件,支持manifest的浏览器,会按照manifest文件的规则,将文件保存在本地,从而在没有网络连接的情况下,也能访问页面。
当我们第一次正确配置app cache后,当我们再次访问该应用时,浏览器会首先检查manifest文件是否有变动,如果有变动就会把相应的变动更新下来,同时改变浏览器里面的app cache,如果没有变动,就会直接把app cache的资源返回。

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