Skip to content

Instantly share code, notes, and snippets.

@wcc526
Created September 26, 2015 06:47
Show Gist options
  • Save wcc526/731acc005210c28adf49 to your computer and use it in GitHub Desktop.
Save wcc526/731acc005210c28adf49 to your computer and use it in GitHub Desktop.
web.md

缓存

强制刷新的话,会在请求头部添加

Pragma:no-cache 和 Cache-Control:no-cache 字段

Last-Modified

表示资源的最后修改时间,浏览器在请求的时候会在请求头中添加一个 If-Modified-Since 字段,查询是否是最新的,如果是返回304 Etag 字段是让服务器给每个页面分配一个唯一的编号,然后通过这个编号来区分 当前这个页面是否是最新的

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