1
我有樣本網站:我可以使用應用程序緩存後備爲不同的主機?
/index.html
/appcache.manifest
/style.css
/test.js
的index.html:
<!DOCTYPE HTML>
<html manifest="appcache.manifest">
<head>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
<div id="map"></div>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>window.google && window.google.maps || console.info('Fail');</script>
</body>
</html>
appcache.manifest:
CACHE MANIFEST
NETWORK:
*
CACHE:
index.html
style.css
test.js
FALLBACK:
http://maps.googleapis.com/maps/api/js?sensor=false test.js
test.js:
window.google = window.google || {};
google.maps = google.maps || {};
console.info('I am work!!!')
當我打開現場第一次在沒有互聯網連接的本地主機上,我在控制檯中看到'Fial'。
我可以在應用程序緩存清單回退部分中使用http://different_domain,如果我可以做我做錯了什麼?
如果一個是絕對的並且一個是相對的(相對於相同的絕對URL評估),它是否允許? – Pacerier 2013-03-26 09:38:36
@Pacerier我不確定,當你嘗試時會發生什麼? – robertc 2013-03-26 11:07:49
它的工作原理,但我想知道什麼關於RFC處方 – Pacerier 2013-03-26 11:33:50