• sw-toolbox: Github

    •   It provides a cononical implementation of all the runtime caching strategies that you need for you dynamice content.
  • sw-precache: Github
    •   It takes care of caching and maintaing all the resources in your app shell
  • sw-helpers: Github
  • lighthouse: Github

sw-toolbox:

For the assets, you can use cache-first:

CacheFirst, will go to cache for fetching data, if there is then return the cache back, will not go to network for fetching data.

If cannot get the data from the cache, then fallback to network to get data.

toolbox.router.get(
'/path/to/images/.*',
toolbox.cacheFirst,
{cache: {
name: 'images',
maxEnteries: // cache at most 6 images
}}
)

For highly dynamic data, can use network first: (Battle Lie-Fi)

NetworkFirst, will go network for fetching data, if get the data then return back.

If cannot get the data, then fallback to cache.

toolbox.router.get(
'/posts/.*',
toolbox.networkFist,
{cache: {
name: 'posts',
maxEnteries: ,
maxAgeSeconds: * * *
},
   networkTimeoutSeconds: 3 // after three sconds, fallback to cache
  }
)

Fastest:

Race between cache and network:

[io PWA] Great libraries and tools for great Progressive Web Apps的更多相关文章

  1. 关于PWA ( Progressive web apps )

    渐进式Web应用程序使用现代Web API以及传统的渐进式增强策略来创建跨平台Web应用程序.这些应用程序无处不在,并提供多种功能,使其具有与本机应用程序相同的用户体验优势.这套文档告诉您需要了解的所 ...

  2. 天人合一物我相融,站点升级渐进式Web应用PWA(Progressive Web Apps)实践

    原文转载自「刘悦的技术博客」https://v3u.cn/a_id_216 PWA(Progressive web apps,渐进式 Web 应用)使用现代的 Web API 以及传统的渐进式增强策略 ...

  3. [PWA] Keynote: Progressive Web Apps across all frameworks

    PWA: Add to home screen Angular Universal Server side rendering: for achieving better proference on ...

  4. PWA(Progressive web apps),渐进式 Web 应用

    学习博客:https://www.jianshu.com/p/098af61bbe04 学习博客:https://www.zhihu.com/question/59108831 官方文档:https: ...

  5. [Firebase + PWA] Keynote: Progressive Web Apps on Firebase

    Link : Video. 1. Firebase Auth: provides simple login with Github, Google, Facebook, Twittr. Link 2. ...

  6. PWA(Progressive Web App)入门系列:(一)PWA简单介绍

    前言 PWA做为一门Google推出的WEB端的新技术,长处不言而喻.但眼下对于相关方面的知识不是非常丰富.这里我推出一下这方面的新手教程系列.提供PWA方面学习. 什么是PWA PWA全称Progr ...

  7. 说说 PWA 和微信小程序--Progressive Web App

    作者:云图图链接:https://zhuanlan.zhihu.com/p/22578965来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 利益相关:微信小用户,谷歌小 ...

  8. (转)PWA(Progressive Web App)渐进式Web应用程序

    PWA 编辑 讨论 PWA(Progressive Web App)是一种理念,使用多种技术来增强web app的功能,可以让网站的体验变得更好,能够模拟一些原生功能,比如通知推送.在移动端利用标准化 ...

  9. PWA全称Progressive Web App,即渐进式WEB应用?

    一个 PWA 应用首先是一个网页, 可以通过 Web 技术编写出一个网页应用. 随后添加上 App Manifest 和 Service Worker 来实现 PWA 的安装和离线等功能解决了哪些问题 ...

随机推荐

  1. jquery 效果

    效果1.基本效果    1.1 show([speed,[easing],[fn]]) 如果元素本身是可见的,则不对其作任何改变.如果元素是隐藏的,则使其可见.        $("p&qu ...

  2. transcode_step()在转码过程中对pts、dts、duration的处理

    对pts.dts.duration的处理主要集中在两大函数里面 1.process_input()读入数据并处理,放到滤镜里面 2.reap_filters()从滤镜读出数据,处理后写入文件 proc ...

  3. Python 统计代码行

    正在学习 Python, 做了个统计代码行的功能, 参考了网上很多前辈的帖子,添加了感觉还是比较实用的功能, 只是windows下测试了,而且代码文件编码形式是 utf-8的. 如果使用其它编码形式的 ...

  4. Android ART简介

    一.    Android ART简介 Android DEX/ODEX/OAT文件

  5. CANoe 入门 Step by step系列(二)CAPL编程【转】

    CAPL就是Communication Application Programming Laguage的缩写,CAPL类似于C语言的语法,因此所有的语法请参考C语言教程,这里不在这里进行详述,关于C语 ...

  6. Bridage

    对于有两个以上的维度的对象,如下图:这张图的业务逻辑是这样的,Hayes,USR以及Emie都是上网的猫,现在有两条线路,一条是传统Dial,还有一条线路是专线,不需要拨号,这样每创建一种线路就意味着 ...

  7. Python如何读取指定文件夹下的所有图像

    (1)数据准备 数据集介绍: 数据集中存放的是1223幅图像,其中756个负样本(图像名称为0.1~0.756),458个正样本(图像名称为1.1~1.458),其中:"."前的标 ...

  8. Codeforces Round #Pi (Div. 2)

    上次比完赛就准备写了, 结果懒癌发作了, 拖到了现在. Problem_A: 题意: 在一条x轴上有n座城市, 每个城市之间的距离就是它们对应坐标的距离, 现在求出每个城市到其他城市的最近距离和最远距 ...

  9. CTSC模拟题 树上的路径

    Description 给定一棵\(N\)个结点的树,结点用正整数\(1 \dots N\)编号,每条边有一个正整数权值.用\(d(a, b)\)表示从结点\(a\)到结点\(b\)路径上经过边的权值 ...

  10. [BZOJ 1029] [JSOI2007] 建筑抢修 【贪心】

    题目链接:BZOJ - 1029 题目分析 使用一种贪心策略. 现将任务按照deadline从小到大排序. 然后枚举每一个任务,如果当前消耗的时间加上完成这个任务的时间不会超过这个任务的deadlin ...