我可以使用html5缓存清单来存储第三方js吗?

Deb*_*ger 4 javascript html5 browser-cache cache-manifest


我想在我的html5缓存清单中使用第三方js.
我不知道我能不能做到,如果可能的话怎么样?
我可以在清单文件中指定完整的第三方js url吗?
我看过一些例子,他们在清单中为图像指定了http url,那么为什么我们不能为js和css做同样的事情呢?
如果我们无法实现它,还有其他选择吗?我知道我们可以将第三方j存储在本地存储中.
示例表示赞赏.

Flo*_*ine 6

根据html5doctors,您可以在缓存清单中设置外部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
Run Code Online (Sandbox Code Playgroud)

如果你想要更多的信息(缓存,后备等),我建议你阅读html5doctors的链接.