manifest / appcache文件问题

时间:2017-04-25 19:42:43

标签: caching manifest html5-appcache

我正在寻找一个可用于iPad网站的离线文件。我相信我必须在设置中遗漏一些内容,因为它似乎无法正常工作,因为我理解它。这就是我的......

索引页:

<!doctype html> <html lang="en" manifest="/cache.appcache">

的.htaccess

AddType text/cache-manifest .appcache <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/cache-manifest "access plus 0 seconds" </IfModule>

cache.appcache

CACHE MANIFEST

CACHE:
/index.php
/img/img.jpg
/img/img@2x.jpg
/inc/script.php
/inc/styles.php

NETWORK:
# All URLs that start with the following lines
# are whitelisted.

FALLBACK: 

以下是我要完成的步骤:

  1. 我导航到该页面并确认没有错误 cache.appcache的url及其中的项目是 正确链接。
  2. 我浏览网站页面以确认一切 按预期运作。没有看到错误。
  3. 我关闭了以太网。
  4. 我可以浏览我之前设置的页面,但是,如果我 点击刷新页面全部休息,我无法回到网站。
  5. 我可能误解了这应该如何适用于“离线”模式,但这似乎对我不正确。

0 个答案:

没有答案