缓存不适用于静态文件
AppCache doesent work with static files
我尝试让应用程序脱机工作,因此只会发送 json 来更新网站,这是我的应用程序缓存文件:
CACHE MANIFEST
# v = 0.1
/
NETWORK:
*
我在控制台上收到此响应:
[I 150323 19:22:38 web:1825] 200 GET /static/css/meteo.css?v=51211953b5b2ec0abdec17b4917b0ae6 (::1) 180.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/css/semantic.min.css?v=b05c5612ace3ff40888d13bf56d56fa9 (::1) 37.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/css/main.css?v=0e2d512c063c6b630de514cc664ce4e2 (::1) 2.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/js/jquery-2.1.1.min.js?v=e40ec2161fe7993196f23c8a07346306 (::1) 8.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/js/semantic.min.js?v=8c9818699a737630d5cbc6fcbaa1db8b (::1) 15.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/js/geo.js?v=aefbcdb7b5c6ab60979ceb1ca264f09c (::1) 2.00ms
[I 150323 19:22:39 web:1825] 200 GET /static/fonts/icons.woff2 (::1) 2.00ms
[I 150323 19:22:39 web:1825] 304 GET /meteo.appcache (::1) 1.00ms
不过好像没用,网上是这样的:
这是我停止服务器的时间:
在 MDN,他们说:
Some browsers (e.g., Firefox) display a notification bar the first time a user loads an application that uses the application cache. The notification bar displays a message such as:
This website (www.example.com) is asking to store data on your computer for offline use. [Allow] [Never for This Site] [Not Now]
但我没有收到任何消息(firefox 36),如果我尝试在清单中使用 /*
要求他缓存所有内容,我收到错误消息:[W 150323 19:28:54 web:1825] 404 GET /* (::1) 3.00ms
,
如果我明确声明它们,我就不会得到它们!
我做错了什么?
看来问题是我没看懂什么是OFFLINE
, this is NO CONNECTION , and not server off!
我尝试让应用程序脱机工作,因此只会发送 json 来更新网站,这是我的应用程序缓存文件:
CACHE MANIFEST
# v = 0.1
/
NETWORK:
*
我在控制台上收到此响应:
[I 150323 19:22:38 web:1825] 200 GET /static/css/meteo.css?v=51211953b5b2ec0abdec17b4917b0ae6 (::1) 180.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/css/semantic.min.css?v=b05c5612ace3ff40888d13bf56d56fa9 (::1) 37.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/css/main.css?v=0e2d512c063c6b630de514cc664ce4e2 (::1) 2.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/js/jquery-2.1.1.min.js?v=e40ec2161fe7993196f23c8a07346306 (::1) 8.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/js/semantic.min.js?v=8c9818699a737630d5cbc6fcbaa1db8b (::1) 15.00ms
[I 150323 19:22:38 web:1825] 200 GET /static/js/geo.js?v=aefbcdb7b5c6ab60979ceb1ca264f09c (::1) 2.00ms
[I 150323 19:22:39 web:1825] 200 GET /static/fonts/icons.woff2 (::1) 2.00ms
[I 150323 19:22:39 web:1825] 304 GET /meteo.appcache (::1) 1.00ms
不过好像没用,网上是这样的:
这是我停止服务器的时间:
在 MDN,他们说:
Some browsers (e.g., Firefox) display a notification bar the first time a user loads an application that uses the application cache. The notification bar displays a message such as:
This website (www.example.com) is asking to store data on your computer for offline use. [Allow] [Never for This Site] [Not Now]
但我没有收到任何消息(firefox 36),如果我尝试在清单中使用 /*
要求他缓存所有内容,我收到错误消息:[W 150323 19:28:54 web:1825] 404 GET /* (::1) 3.00ms
,
如果我明确声明它们,我就不会得到它们!
我做错了什么?
看来问题是我没看懂什么是OFFLINE
, this is NO CONNECTION , and not server off!