PWA

Beskrivning

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

  • Pålitliga – Laddar direkt och visa aldrig ”downasauren”, även under osäkra nätverksförhållanden.
  • Snabba – Svarar snabbt på användarnas interaktioner med silkeslena animationer och utan krånglig rullning.
  • Engagerande – Känns som en naturlig app på enheten, med en uppslukande användarupplevelse.

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

Fortsätt läsa mer om Progressive Web Apps (PWA) från Google.

I allmänhet är en PWA beroende av följande tekniker för att vara tillgänglig:

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.

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 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 strategy. For all the details on these changes, see the pull request.

Dokumentation för tillägget finns på GitHub-projektets Wiki.

Utvecklingen av detta tillägg sker på GitHub. ”Pull Requests” är välkomna. Se ärenden som rapporterats där innan du går till tilläggets forum.

Vanliga frågor

Se Vanliga frågor på GitHub-projektets Wiki. Ser du inget svar på din fråga? Sök i supportforumet för att se om någon har ställt din fråga. Annars kan du öppna ett nytt supportämne.

Recensioner

Läs alla 25 betyg

Bidragsgivare och utvecklare

”PWA” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

”PWA” har översatts till 10 språk. Tack till översättarna för deras bidrag.

Översätt ”PWA” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

För att se tilläggets ändringslogg, gå till sidan för utgåvor på GitHub.