Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/GoogleChromeLabs/pwa-wp

WordPress feature plugin to bring Progressive Web Apps (PWA) to Core
https://github.com/GoogleChromeLabs/pwa-wp

https pwa service-worker web-app-manifest wordpress

Last synced: about 1 month ago
JSON representation

WordPress feature plugin to bring Progressive Web Apps (PWA) to Core

Awesome Lists containing this project

README

        

# PWA

![Banner](.wordpress-org/banner-1544x500.png)

WordPress feature plugin to bring Progressive Web App (PWA) capabilities to Core

**Contributors:** [google](https://profiles.wordpress.org/google), [xwp](https://profiles.wordpress.org/xwp), [rtcamp](https://profiles.wordpress.org/rtcamp), [westonruter](https://profiles.wordpress.org/westonruter), [albertomedina](https://profiles.wordpress.org/albertomedina)
**Tags:** [pwa](https://wordpress.org/plugins/tags/pwa), [progressive web apps](https://wordpress.org/plugins/tags/progressive-web-apps), [service workers](https://wordpress.org/plugins/tags/service-workers), [web app manifest](https://wordpress.org/plugins/tags/web-app-manifest)
**Requires at least:** 6.4
**Tested up to:** 6.6
**Stable tag:** 0.8.1
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
**Requires PHP:** 7.0

[![Build Status](https://github.com/GoogleChromeLabs/pwa-wp/workflows/Build,%20test%20&%20measure/badge.svg)](https://github.com/GoogleChromeLabs/pwa-wp/actions?query=branch%3Adevelop+workflow%3A%22Build%2C+test+%26+measure%22)
[![Built with Grunt](https://gruntjs.com/cdn/builtwith.svg)](http://gruntjs.com)

## Description


Progressive Web Apps are user experiences that have the reach of the web, and are:



  • Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.


  • Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.


  • Engaging - Feel like a natural app on the device, with an immersive user experience.

This new level of quality allows Progressive Web Apps to earn a place on the user's home screen.

Continue reading more about [Progressive Web Apps](https://web.dev/progressive-web-apps/) (PWA) from Google.

In general a PWA depends on the following technologies to be available:

* [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
* [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest)
* [HTTPS](https://en.wikipedia.org/wiki/HTTPS)

This plugin serves as a place to implement support for these in WordPress with the intention of being proposed for core merge, piece by piece. Case in point, the HTTPS functionality from this plugin has largely been made part of Core: [Improved HTTPS detection and migration in WordPress 5.7](https://make.wordpress.org/core/2021/02/22/improved-https-detection-and-migration-in-wordpress-5-7/).

This feature plugin is _not_ intended to obsolete the other plugins and themes which turn WordPress sites into PWAs. Rather, this plugin is intended to provide the PWA building blocks and coordination mechanism for these themes and plugins to not reinvent the wheel and also to not conflict with each other. For example, a theme that implements the app shell model should be able to extend the core service worker while a plugin that provides push notifications should be able to do the same. Themes and plugins no longer should have to each create a service worker on their own, something which is inherently problematic because only one service worker can be active at a time: only one service worker can win. If you are developing a plugin or theme that includes a service worker, consider relying on this PWA plugin, or at least only use the built-in implementation as a fallback for when the PWA plugin is not available.

In versions prior to 0.6, no caching strategies were added by default. The only service worker behavior was to serve an offline template when the client's connection is down or the site is down, and also to serve an error page when the server returns with 500 Internal Server Error. As of 0.6, there is a new “Offline browsing” toggle on the Reading Settings screen in the admin. It is disabled by default, but when enabled a [network-first](https://web.dev/offline-cookbook/#network-falling-back-to-cache) caching strategy is registered for navigations so that the offline page won't be shown when accessing previously-accessed pages. The network-first strategy is also used for assets from themes, plugins, and WordPress core. In addition, uploaded images get served with a [stale-while-revalidate](https://web.dev/offline-cookbook/#stale-while-revalidate) strategy. For all the details on these changes, see the [pull request](https://github.com/GoogleChromeLabs/pwa-wp/pull/338).

Documentation for the plugin can be found on the [GitHub project Wiki](https://github.com/GoogleChromeLabs/pwa-wp/wiki).

**Development of this plugin is done [on GitHub](https://github.com/GoogleChromeLabs/pwa-wp). Pull requests welcome. Please see [issues](https://github.com/GoogleChromeLabs/pwa-wp/issues) reported there before going to the [plugin forum](https://wordpress.org/support/plugin/pwa).**

## Frequently Asked Questions

Please see the [frequently asked questions](https://github.com/GoogleChromeLabs/pwa-wp/wiki/FAQ) on the GitHub project wiki. Don't see an answer to your question? Please [search the support forum](https://wordpress.org/support/plugin/pwa/) to see if someone has asked your question. Otherwise, please [open a new support topic](https://wordpress.org/support/plugin/pwa/#new-post).

## Changelog

For the plugin’s changelog, please see [the Releases page on GitHub](https://github.com/GoogleChromeLabs/pwa-wp/releases).