From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../progressive_web_apps/re-engageable/index.html | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/zh-cn/web/progressive_web_apps/re-engageable/index.html (limited to 'files/zh-cn/web/progressive_web_apps/re-engageable/index.html') diff --git a/files/zh-cn/web/progressive_web_apps/re-engageable/index.html b/files/zh-cn/web/progressive_web_apps/re-engageable/index.html new file mode 100644 index 0000000000..4fb4a7475f --- /dev/null +++ b/files/zh-cn/web/progressive_web_apps/re-engageable/index.html @@ -0,0 +1,78 @@ +--- +title: Re-engageable +slug: Web/Progressive_web_apps/Re-engageable +tags: + - Modern web apps + - Notifications API + - Progressive web apps + - Push API + - Service Workers +translation_of: Web/Progressive_web_apps +--- +
+
原生平台一个主要优势是,用户可以轻松通过更新或加载新内容,即使用户没有正在查看应用程序或者使用他们的设备。现在的Web应用程序现在也可以使用Web Push API等技术实现这样的功能。
+ +
+
+ +

核心指南

+ +
+
Using service workers
+
A simple guide for those new to the Service Worker API.
+
Using the Push API
+
Learn the essentials behind the Web Push API.
+
Using the Notifications API
+
Web notifications in a nutshell.
+
+ +

技术

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
技术描述浏览器支持最新规范
Service workersJavaScript running in a special worker context that is run by the browser under certain circumstances such as fetch or push events. These allow the service worker to intercept responses and customise them in any way you want, for example caching assets for offline use before they are served.Experimental: Chrome and Firefox (more detail){{SpecName('Service Workers')}}
Push APIWhen subscribed to, the push service provides an endpoint that can be used by a server to send a push message to a web app under the control of a particular service worker.Experimental: chrome and Firefox (more detail){{SpecName("Push API")}}
Notifications APIFires system notifications directly from web applications.Widespreadin modern browsers (more detail){{SpecName('Web Notifications')}}
+ +

工具

+ +
+
ServiceWorkerWare
+
An Express-like microframework for easy Service Worker development.
+
oghliner
+
Not only a template but a tool for deploying Offline Web Apps to GitHub Pages.
+
sw-precache
+
A node module to generate service worker code that will precache specific resources.
+
+ +

参见

+ +
+
The service worker cookbook
+
A series of excellent service worker recipes, showing how to implement an offline app, but also much more.
+
-- cgit v1.2.3-54-g00ecf