HTML5应用程序缓存Firefox正在缓存未列出的当前页面
我的清单如下所示:HTML5应用程序缓存Firefox正在缓存未列出的当前页面,html,firefox,html5-appcache,cache-manifest,Html,Firefox,Html5 Appcache,Cache Manifest,我的清单如下所示: <?php header("Cache-Control: no-cache, private"); header("Content-Type: text/cache-manifest"); ?> CACHE MANIFEST # v32 /wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css?v=3.1.9.3 /wp-content/themes/mytheme/
<?php
header("Cache-Control: no-cache, private");
header("Content-Type: text/cache-manifest");
?>
CACHE MANIFEST
# v32
/wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css?v=3.1.9.3
/wp-content/themes/mytheme/css/reset.css
/wp-content/themes/mytheme/js/jquery-2.1.3.min.js
/wp-content/themes/mytheme/img/reset.png
/wp-content/themes/mytheme/img/tablette_petit.png
/wp-content/themes/mytheme/img/ordi_petit.png
/wp-content/themes/mytheme/img/home.png
/wp-content/themes/mytheme/img/update.png
/wp-content/themes/mytheme/font/tahoma2.ttf
FALLBACK:
/ /offline/
缓存清单
#v32
/wp content/plugins/sitepress多语言cms/res/css/language selector.css?v=3.1.9.3
/wp content/themes/mytheme/css/reset.css
/wp content/themes/mytheme/js/jquery-2.1.3.min.js
/wp content/themes/myteme/img/reset.png
/wp content/themes/mytheme/img/tablette_petit.png
/wp content/themes/mytheme/img/ordi_petit.png
/wp content/themes/mytheme/img/home.png
/wp content/themes/mytheme/img/update.png
/wp content/themes/mytheme/font/tahoma2.ttf
退路:
//离线/
目标是在任何页面脱机时显示脱机页面
此清单在访问页面时设置:
这不是一个bug,它是应用程序的一个特性,它被称为主条目
这里讨论:
主条目是一个HTML文件,其中包含一个清单属性
指向清单文件的html元素(这是唯一的方法
创建HTML5应用缓存(顺便说一句)。任何这样的HTML文件都是自动生成的
添加到缓存中
检查此项以获得解决方案:
<!doctype html>
<?php
$manifest="";
if($pagename == "mypage"){
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false){
$manifest="manifest=\"/cachemanifest/\"";
}else{
$manifest="manifest=\"/cachemanifestothers/\"";
}
}
//$manifest="";
?>
<html class="mainsite" <?php echo $manifest; ?>>