微信中浏览器缓存了不该缓存的网页?


服务端 用的 python的flask框架
返回静态文件代码如下
flask.send_file('../static/js/main.js',cache_timeout=0)

request headers如下:


 GET /static/js/main.js?__inline=true HTTP/1.1
Host: anglestreet.duapp.com
Connection: keep-alive
Cache-Control: max-age=0
Accept: */*
If-None-Match: "flask-1409227359.0-21401-527044139"
If-Modified-Since: Thu, 28 Aug 2014 12:02:39 GMT
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/36.0.1985.125 Chrome/36.0.1985.125 Safari/537.36
DNT: 1
Referer: http://anglestreet.duapp.com/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh,zh-CN;q=0.8
Cookie: BAEID=81F2D83EAD7D00091521BA62EDC1894B:FG=1;

response headers如下:


 HTTP/1.1 200 OK
Content-Type: application/javascript
Last-Modified: Thu, 28 Aug 2014 12:02:39 GMT
Cache-Control: public, max-age=0
Expires: Fri, 29 Aug 2014 15:21:59 GMT
ETag: "flask-1409227359.0-21401-527044139"
Set-Cookie: session=eyJyb2xlIjoiYWRtaW4iLCJ1c2VybmFtZSI6ImFkbWluIn0.BuIsFw.LKeoAWvqoRfNYlU-Sk1kaz-icc4; HttpOnly; Path=/
Date: Fri, 29 Aug 2014 15:21:59 GMT
Server: BWS/1.0
Content-Length: 21401

在chrome浏览器下无问题. 在微信链接中打开则经常出现版本过期的情况, 必须手动刷新

前端 移动端web 网页开发 php

可爱的梨梨花 10 years, 2 months ago

Your Answer