我想在我的 html5 缓存 list 中使用第三方 js。
我不知道我能不能做,如果可能的话怎么做?
我可以在 list 文件中指定完整的第三方 js url 吗?
我已经看到他们在 list 中为图像指定了 http url 的示例,那么为什么我们不能为 js 和 css 做同样的事情呢?
如果我们不能实现它,还有其他选择吗?我知道我们可以在本地存储第三方js。
示例表示赞赏。
最佳答案
根据 html5doctors ,您可以在缓存 list 中设置外部 url。这是一个例子:
CACHE MANIFEST
# This is the cache part where you specify files to cache
CACHE
/some/file.js
/some/other/file.css
http://some.external.url/file.js
如果您想了解更多信息(缓存、回退等),我建议您阅读 html5doctors 的链接。
关于javascript - 我可以使用html5缓存 list 来存储第三方js吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10795268/