PWA

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 (PWA) from Google.

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

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.

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.

Documentation for the plugin can be found on the GitHub project Wiki.

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

常见问题

Please see the frequently asked questions on the GitHub project wiki. Don’t see an answer to your question? Please search the support forum to see if someone has asked your question. Otherwise, please open a new support topic.

Reviews

2020年7月6日
The plugin helped me to convert my blog in a PWA, only the short_name was an issue and fixed using the small plugin to include an extra field.
2020年5月30日
I've been baking this into my themes and boilerplate manually for a while now. I'm stoked to see this on it's way to the core of WordPress. Thank you for your contributions!
2020年1月24日
I believe PWAs are the future of mobile, I am using this plugin as well as the Drupal PWA module on 3 different sites/apps currently. I like how this uses Workbox and wondering when will support for background sync be included. Very useful and customizable plugin as it is.
2019年10月10日
Biggest speed improvement is when I added navigation pre-load filter: add_filter( 'wp_service_worker_navigation_caching_strategy', function() { return WP_Service_Worker_Caching_Routes::STRATEGY_STALE_WHILE_REVALIDATE; } ); add_filter( 'wp_service_worker_navigation_caching_strategy_args', function( $args ) { $args['cacheName'] = 'pages'; $args['plugins']['expiration']['maxEntries'] = 50; return $args; } ); Resulting in sub 200ms page load time! I'm also using it to cache images, css, js. Easy to update manifest as well through filter: function get_manifest_update( $manifest ) { /* $manifest = array( 'name' => wp_kses_decode_entities( get_bloginfo( 'name' ) ), 'start_url' => home_url( '/' ), 'display' => 'minimal-ui', 'dir' => is_rtl() ? 'rtl' : 'ltr', ); */ // Add argument to $manifest array $manifest['start_url'] .= 'en/page/support/'; $manifest['short_name'] = 'My App'; $manifest['name'] = 'Full name of app'; return $manifest; } add_filter( 'web_app_manifest', 'get_manifest_update' ); Hopefully this will be added to WP core soon! Thanks for making it easy to implement service workers with hooks as well, great way to introduce Devs to PWA!
阅读所有的11评价

Contributors & Developers

“PWA” 是开源软件。 以下人员对此插件做出了贡献。

Contributors

“PWA” 已翻译成5 语言环境。 感谢译者的贡献。

将“PWA”翻译成您的语言。

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

更新日志

For the plugin’s changelog, please see the Releases page on GitHub.