• 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. AS3.0定义变量的访问范围

    在AS3.0中变量的默认访问范围是:internal:包内成员可以访问,包外不可访问.AS2.0默认访问范围是public

  2. Python核心编程2第四章课后练习

    4-1 Python 对象.与所有 Python 对象有关的三个属性是什么?请简单的描述一下.      身份:对象的唯一标识      类型 :对象的类型决定了该对象可以保存什么类型的值       ...

  3. codeforces 359 C - Robbers' watch

    Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u   Description Robb ...

  4. 关于Memcache使用的工具类

    分布式缓存有它自己的好处 . 下面的 ConstValue.sessionId  是一个常量 public static readonly string sessionId = "sessi ...

  5. Unity3D 解决c#脚本乱码

    怀着无比激动的心情下载了Unity3D,按照网上的教程试着制作我的第一个U3D"作品":camera绑定绘制GUI显示"Hello, World",很简单的例子 ...

  6. 制作手机浏览器显示格式的HTML页面

    最近要推出手机支持访问的HTML页面效果,而这在制作手机页面的过程中状况连连. 主要一下就我制作的工程中所遇的问题说明一下: 1. 改掉HTML页面声明:(以往大部分页面都是HTML4.0的声明) 还 ...

  7. POJ 1159 Palindrome 最长公共子序列的问题

    Description A palindrome is a symmetrical string, that is, a string read identically from left to ri ...

  8. NDK的安装和下载

    从官网下载NDK 下载页面:https://developer.android.com/ndk/downloads/index.html 从镜像站点下载NDK "大师兄"是一个由腾 ...

  9. php 下载

    $file='url.xlsx'; if (file_exists(EA_DIR_DATA . $file)) {            header('Content-Description: Fi ...

  10. The sum - SGU 122(斐波那契前N项和)

    直接上代码....... ======================================================================================= ...