木子屋 Dnawo's BLOG

IE刷新网页快捷键F5和Ctrl+F5的区别

👤 dnawo 📅 2015-01-03 👁 4024 👍 0 💬 0 🔄 来源:本站原创
IE按F5或Ctrl+F5都可以刷新网页,它们有什么区别?下边根据HTTP Header来解释它们的区别:

F5刷新网页

Request Headers:
GET /ip.htm HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: zh-CN
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0; BOIE9;ZHCN)
Accept-Encoding: gzip, deflate
Host: www.mzwu.com
If-Modified-Since: Wed, 26 Nov 2014 14:37:49 GMT
If-None-Match: "801c68d869d01:1d9d"

DNT: 1
Connection: Keep-Alive
Pragma: no-cache

Response Headers:
HTTP/1.1 304 Not Modified
Last-Modified: Wed, 26 Nov 2014 14:37:49 GMT
Accept-Ranges: bytes
ETag: "801c68d869d01:1d9d"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sat, 03 Jan 2015 14:47:50 GMT

Ctrl+F5刷新网页

Request Headers:
GET /ip.htm HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: zh-CN
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0; BOIE9;ZHCN)
Accept-Encoding: gzip, deflate
Host: www.mzwu.com
DNT: 1
Connection: Keep-Alive
Pragma: no-cache

Response Headers:
HTTP/1.1 200 OK
Content-Length: 13
Content-Type: text/html
Last-Modified: Wed, 26 Nov 2014 14:37:49 GMT
Accept-Ranges: bytes
ETag: "801c68d869d01:1d9d"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sat, 03 Jan 2015 14:47:50 GMT

结论:F5尽可能使用缓存,而Ctrl+F5总不使用缓存。

评论(0)

暂无评论。

验证码
评论需审核通过后显示
← 上一篇 同一页面jQuery多个版本或和其他js库冲突解决方法 下一篇 → IE直接打开JSON不弹出保存对话框设置方法