漸進式網路應用程式

漸進式網路應用程式(Progressive web app)使用當代 web API,並以漸進增強策略,建立跨平台 web 應用程式。 這些程式提供了能讓用戶體驗,逼近於原生程式的功能。這套文件將講述你需要知道的一切。

PWA 優勢

PWA 應該要可探索、可安裝、可連結、可獨立於網路、可漸進、可接合、響應式、以及安全(discoverable, installable, linkable, network independent, progressive, re-engageable, responsive, safe)。需要有關這方面的理解,請參閱漸進式網路應用程式的優勢。如果需要實作細節,請參考以下章節表列的教學。

PWA 核心教學

技術教學

工具

  • localForage:讓用戶端儲存變簡單的輕量化 JavaScript 函式庫。預設上使用 IndexedDB,必要時則改用 SQL/Web 儲存。
  • 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.
  • workbox — spiritual successor to sw-precache with more advanced caching strategies and easy precaching.
  • upup — a tiny script that makes sure your site is always there for your users.
  • The service worker cookbook — A series of excellent service worker/push recipes, showing how to implement an offline app, but also much more.

參見