我尝试使用 Html5 应用程序缓存在离线模式下运行我的应用程序。为此,我创建了 test.html 文件和 demo.appcache
在这个 html 页面中,我使用了来自本地主机的一些图像。当我的本地主机运行时,它工作正常。但是,如果我试图停止本地主机,图像不会从我的应用程序缓存中获取。输出只是显示为空白页。
这是我的 sampletest.html
<!DOCTYPE html>
<html manifest="demo.appcache">
<head>
</head>
<body>
Further modified........Test Again
<img src="http://172.17.0.238/SampleImages/two.jpg" width="225" height="151" alt="Milford Sound in New Zealand" />
</body></html>
demo.appcache
CACHE MANIFEST
CACHE:
sampletest.html
NETWORK:
倒退:
我的代码有什么问题吗?在缓存下:我加载了我的 html 文件。但是,当本地主机不可用时,它不会从应用缓存中加载 html。
任何帮助...问候,Lokesh。