我的缓存清单文件如下所示:
CACHE MANIFEST
calendar.html
scripts/jquery.js
scripts/calendar.js
NETWORK:
https://apis.google.com/js/client.js
我的 calendar.html 看起来像:
<html manifest="calendar.cache">
<head>
<script src="scripts/jquery.js" type="text/javascript"></script>
<script src="scripts/calendar.js" type="text/javascript"></script>
<script src='https://apis.google.com/js/client.js?onload=checkAuth'></script>
</head>
<body>
<div id="authorize-div" style="display: inline">
<span>Authorize access to Google Calendar API</span>
<!--Button for the user to click to initiate auth sequence -->
<button id="authorize-button">
Authorize
</button>
</div>
<pre id="output"></pre>
<script>
$(document).ready(function(){
console.log("ready");
})
</script>
</body>
</html>
如果我禁用缓存一切正常。但是,启用缓存后,我收到apis.google.com/js/client.js
文件错误。错误是jquery.js:5 GET https://apis.google.com/js/client.js?onload=checkAuth&_=1474962265124 net::ERR_FAILED
。这是针对 google chrome 浏览器的,但我在 firefox 上遇到了类似的错误。我错过了什么?