相关疑难解决方法(0)

HTML5 - 缓存清单在Chrome上运行良好,但在Firefox和Opera上运行不佳

我正在开发一个供离线使用的Web应用程序,因此我需要使用应用程序缓存功能.

一切都在Chrome(15.0.874.106)上运行良好,但在Firefox(7.0.1)和Opera(11.52)上不起作用.

这是我的缓存清单文件cache.manifest.php(我已将其减少到最低限度):

<?php 
    header("Cache-Control: max-age=0, no-cache, no-store, must-revalidate");
    header("Pragma: no-cache");
    header("Expires: Wed, 11 Jan 1984 05:00:00 GMT");
    header('Content-type: text/cache-manifest');
?>CACHE MANIFEST

CACHE:

/app/common/css/reset.css
/favicon.ico
Run Code Online (Sandbox Code Playgroud)

这是"主要"HTML文档的前4行:

<!DOCTYPE html> 
<html manifest="/app/mobile/cache.manifest.php"> 
    <head> 
    <title>MyApp Mobile</title> 
Run Code Online (Sandbox Code Playgroud)

当我尝试将缓存清单(http://www.myapp.com/app/mobile/cache.manifest.php)加载到浏览器中时,文件显示正确,但是当我尝试离线加载页面时,我得到了"无法连接"错误页面.再次,这恰好发生在Firefox和Opera上.

Firebug说" 0 items in offline cache"并且我没有找到检查DragonFly上的应用程序缓存的方法.

我生气了,我不知道如何在Firefox和Opera上有效地调试问题.请帮忙.

谢谢,丹

firefox html5 opera offline application-cache

22
推荐指数
3
解决办法
2万
查看次数

标签 统计

application-cache ×1

firefox ×1

html5 ×1

offline ×1

opera ×1