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