随笔分类 -  PWA

Progressive web app
摘要:const installedApps = await navigator.getInstalledRelatedApps() const packageId = "com.app.pwa" const app = installedApps.find(app => app.id packageId 阅读全文
posted @ 2023-08-04 15:38 Zhentiw 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Be careful with the storage use cases, free the storage when it is necessary. 阅读全文
posted @ 2019-12-02 19:11 Zhentiw 阅读(114) 评论(0) 推荐(0) 编辑
摘要:On Android and in Chrome (but not on iOS), it's possible to send push notifications with a PWA. We'll start by asking the user for permission to send 阅读全文
posted @ 2019-01-02 03:28 Zhentiw 阅读(818) 评论(0) 推荐(0) 编辑
摘要:It's possible to access some, but not all, of the native device features from a PWA. One that we canaccess, is the camera and camera roll. We'll use t 阅读全文
posted @ 2018-12-31 21:38 Zhentiw 阅读(800) 评论(0) 推荐(0) 编辑
摘要:Because an installed PWA is really just a web app running in a browser, there are some browser behaviors that we may not want in our app, if we're goi 阅读全文
posted @ 2018-12-30 15:32 Zhentiw 阅读(549) 评论(0) 推荐(0) 编辑
摘要:Android displays a splash screen for PWAs based on the icons and names you provide, but iOS just displays a solid color splash screen for installed PW 阅读全文
posted @ 2018-12-30 15:26 Zhentiw 阅读(601) 评论(0) 推荐(0) 编辑
摘要:We're storing JSON data in the cache - but that only applies to HTTP GET requests - and not to POST or DELETE requests. We'll add a fetch event listen 阅读全文
posted @ 2018-12-30 14:53 Zhentiw 阅读(191) 评论(0) 推荐(0) 编辑
摘要:We can view the PWA offline because we are caching the static and CDN assets for the app - but the list of todo items won't display, because those API 阅读全文
posted @ 2018-12-28 21:13 Zhentiw 阅读(274) 评论(0) 推荐(0) 编辑
摘要:Our service worker caches our static assets - but only those assets that are included in our React App. This means that assets like Bootstrap, which w 阅读全文
posted @ 2018-12-28 21:09 Zhentiw 阅读(1076) 评论(0) 推荐(0) 编辑
摘要:The default service worker that comes with create-react-app doesn't allow for very much configuration. We'll replace that default service worker in tw 阅读全文
posted @ 2018-12-28 20:56 Zhentiw 阅读(1023) 评论(0) 推荐(0) 编辑
摘要:By default, browsers load the assets in a render-blocking way. Modern browsers introduced prefetch and preload which let us specify the priority for a 阅读全文
posted @ 2018-07-02 21:18 Zhentiw 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Even if you have your application fully cached, you couldn’t perform any external request without internet connection. That’s why in order to build an 阅读全文
posted @ 2018-07-02 20:54 Zhentiw 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Service Workers get installed and activated in the background, but until we reload the page they don’t take full control in the app. Showing a notific 阅读全文
posted @ 2018-07-02 20:08 Zhentiw 阅读(192) 评论(0) 推荐(0) 编辑
摘要:In some cases, you want to get fresh data instead of cache data to the screen, such as stock applications. Only fallback to cache data if cannot get r 阅读全文
posted @ 2018-04-19 01:56 Zhentiw 阅读(201) 评论(0) 推荐(0) 编辑
摘要:If you want to cache API response by using angular service-worker, you can do it in: src/ngsw-config.json: 阅读全文
posted @ 2018-04-19 01:51 Zhentiw 阅读(258) 评论(0) 推荐(0) 编辑
摘要:If our PWA application has a new version including some fixes and new features. By default, when you refresh your page, service worker will check ngsw 阅读全文
posted @ 2018-04-18 01:08 Zhentiw 阅读(433) 评论(0) 推荐(0) 编辑
摘要:If you alread have an existing Angular application and want to upgrade to progressive web app. 1. Install @angular/service-worker: 2. Create a file: s 阅读全文
posted @ 2018-04-18 01:02 Zhentiw 阅读(252) 评论(0) 推荐(0) 编辑
摘要:The takeway is to know when we should cache the content? When we should clean the caches? 1. When should cache the content? This should be done in the 阅读全文
posted @ 2017-11-08 04:20 Zhentiw 阅读(211) 评论(0) 推荐(0) 编辑
摘要:Link : Video. 1. Firebase Auth: provides simple login with Github, Google, Facebook, Twittr. Link 2. Manifest: 3. Generate Mainfest and icons: Link 4. 阅读全文
posted @ 2016-06-05 21:43 Zhentiw 阅读(611) 评论(0) 推荐(0) 编辑
摘要:Mainly introduce two libaraies: sw-precache and sw-toolbox. Install: Types of caching Broadly, there are two types of caching Precaching—We'll precach 阅读全文
posted @ 2016-06-02 03:33 Zhentiw 阅读(365) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示