workbox
王乐平
这个作者很懒,什么都没留下…
展开
-
Glob Patterns匹配模式使用
前段时间在用workbox时,在做precache时,匹配模式基于的是Glob Pattern模式,于是就看了下相关文档。下面翻译一下node-glob的使用,原文:https://github.com/isaacs/node-glob#glob-primerGlob像在shell里面,用*等匹配模式来匹配文件。Glob基于Javascript实现,使用minimatch库进行匹配。...翻译 2018-12-29 23:45:08 · 3872 阅读 · 0 评论 -
Workbox.routing v3.x 中文版
NAMESPACE STATICVERSION V3.6.1类NavigationRouteNavigationRoute可以轻松创建匹配浏览器navigation requests的Route。它仅匹配mode设置为navigate的请求。您可以只使用blacklist和whitelist参数中的一个或两个,将此路由应用于导航请求中。RegExpRouteRegE...翻译 2019-01-10 17:42:10 · 852 阅读 · 0 评论 -
Workbox.strategies v3.x 中文版
NAMESPACE STATICVERSION V3.6.1该模块提供了大多数serviceworker常用的缓存策略的简单实现。类CacheFirstcache-first请求策略的实现。缓存优先策略对于带版本号的资源是非常有用的,像这种URLstyles/example.a8f5f1.css,因为它们可以长时间缓存。CacheOnlycache-only请求策...翻译 2019-01-10 20:41:12 · 660 阅读 · 0 评论 -
Workbox CLI v3.x 中文版
What’s the Workbox CLI?The Workbox command line interface (contained in the workbox-cli package) consists of a Node.js program called workbox that can be run from a Windows, macOS, of UNIX-compatible...翻译 2019-01-02 21:57:50 · 2453 阅读 · 0 评论 -
Workbox-Window v4.x 中文版
Workbox 目前发了一个大版本,从 v3.x 到了 v4.x,变化有挺大的,下面是在 window 环境下的模块。什么是 workbox-window?workbox-window 包是一组模块,用于在 window 上下文中运行,也就是说,在你的网页内部运行。 它们是 servicewoker 中运行的其他 workbox 的补充。workbox-window的主要功能/目标是:...翻译 2019-03-14 01:48:21 · 1601 阅读 · 0 评论