0
我遇到了我的網站的appcache和清單文件問題。Appcache不起作用:清單獲取失敗(404)
demo.appcache文件:
CACHE MANIFEST
/img/logoSmallSmall.png
/crosshair.html
HTML,我想緩存:
<!DOCTYPE html>
<html manifest="demo.appcache">
<head>
<title>crosshairs</title>
</head>
<body>
<h1>katse</h1>
<img src="img/logoSmallSmall.png" alt="image text" onclick="javascript:alert('Your popup message');" />
<div style="display: none;">sdsd</div>
<img src="img/logoSmallSmall.png" alt="image text" onclick="javascript:alert('Your popup message2');" />
<div style="display: none;">sdsd</div>
<img src="img/logoSmallSmall.png" alt="image text" onclick="javascript:alert('Your popup message3');" />
<div style="display: none;">sdsd</div>
</body>
</html>
該行添加到的.htaccess:
AddType text/cache-manifest .appcache
在Chrome的JavaScript控制檯給了我這樣的錯誤:
Application Cache Error event: Manifest fetch failed (404)
有人能幫助我解決這個問題?
你的目錄結構是什麼樣的? .appcache文件位於何處? – lemieuxster 2015-04-04 22:06:17
.appcache位於我的HTML文件所在的同一目錄中。 – OFFLlNE 2015-04-05 11:44:22
如果直接點擊清單網址,它會加載「http://yoursite.tld/demo.manifest」?另外,你有沒有嘗試過這個工具? http://manifest-validator.com/ – lemieuxster 2015-04-05 14:28:20