gpt4 book ai didi

引用目录默认文档的 HTML5 appCache list

转载 作者:搜寻专家 更新时间:2023-10-31 22:49:45 24 4
gpt4 key购买 nike

在我正在处理的整个 jQuery 移动网站中,我都有以下列方式引用 url 的 anchor 标记:

  • "/目录/"
  • "/目录/子目录/"

当然是指:

  • “/目录/index.html”
  • “/目录/子目录/index.html”

那么在我的 list 文件中我是否需要引用“根”版本?例如

CACHE MANIFEST

CACHE:
/directory/
/directory/index.html
/directory/subdirectory/
/directory/subdirectory/index.html

NETWORK:
*

FALLBACK:
/ /offline.html

或:

CACHE MANIFEST

CACHE:
/directory/index.html
/directory/subdirectory/index.html

NETWORK:
*

FALLBACK:
/ /offline.html

它会自动知道“/directory/”等同于“/directory/index.html”等吗?好像不会。

最佳答案

缓 stub 据 URL 键控。浏览器访问 /directory/ 时获取的任何文件都是它将为该 URL 缓存的任何文件。然而,它不会自动知道 /directory/index.html 等同于 /directory/,只有您的服务器知道这一点。如果您在 list 中列出两个 URL,那么这两个 URL 将被缓存,即使它们最终是相同的。

关于引用目录默认文档的 HTML5 appCache list ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8512345/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com