网站设置缓存的问题

来源:互联网 发布:python lxml etree 编辑:程序博客网 时间:2024/06/05 11:34



【直接在html添加meta参数即可】


<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  



  修改html的时间:

  -rw-r--r-- 1 root root 1157 7月  20 15:59 user_reg.html  ---  7月20日 15:59 


   浏览器查看到的时间


  1. 【Response header】

  2. Accept-Ranges:
    bytes
  3. Connection:
    Keep-Alive
  4. Content-Length:
    1157 ----- 文件大小
  5. Content-Type:
    text/html
  6. Date:
    Thu, 20 Jul 2017 12:52:11 GMT --- 这个是当前获取html的时间,也是GMT时间
  7. ETag:
    "485-554bb214f0e80"
  8. Keep-Alive:
    timeout=5, max=100
  9. Last-Modified:
    Thu, 20 Jul 2017 07:59:38 GMT —— 显示GMT(格林威治时间),跟北京时间相差8小时
  10. Server:
    Apache/2.4.25 (Unix) OpenSSL/1.0.1e-fips PHP/5.6.6

       【Request header】

  1. Accept:
    text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  2. Accept-Encoding:
    gzip, deflate
  3. Accept-Language:
    zh-CN,zh;q=0.8
  4. Cache-Control:
    max-age=0
  5. Connection:
    keep-alive
  6. Host:
    139.199.153.200
  7. If-Modified-Since:
    Tue, 18 Jul 2017 07:51:20 GMT
  8. If-None-Match:
    "da0-55492c7f16e00"
  9. Referer:
    http://139.199.153.200/clients/shop_yaqi/html/transition.html?name=UkMwDPyJkJb0ASkM5VF7q9Dp90
  10. Upgrade-Insecure-Requests:
    1
  11. User-Agent:
    Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/

原创粉丝点击