Just another contact form plugin. Simple but flexible.
About Web Worker Offloading
This plugin improves performance by offloading JavaScript execution to a Web Worker, which can result in better Interaction to Next Paint (INP) scores. It is currently experimental but can be activated for specific scripts by adding the 'worker' script data to the registered script. The plugin also includes built-in integrations to offload Google Analytics for certain plugins, but it's important to monitor analytics and INP scores after activation.Frequently asked questions
What does this plugin do?
This plugin offloads JavaScript execution to a Web Worker, improving performance by freeing up the main thread. This should translate into improved Interaction to Next Paint (INP) scores. This functionality is experimental.
How do I offload a script to a web worker?
To opt in a script to be loaded in a worker, simply add worker script data to a registered script. For example, if you have a script registered with the handle of foo, opt-in to offload it to a web worker by doing: wp_script_add_data( 'foo', 'worker', true );
What are the benefits of offloading scripts to a web worker?
Unlike with script loading strategies like async/defer, any inline before/after scripts associated with the worker-offloaded registered script will also be offloaded to the worker. This helps prevent inline scripts from blocking the main thread.
Which plugins have built-in integrations for Google Analytics offloading?
The plugin currently ships with built-in integrations to offload Google Analytics to a web worker for Rank Math SEO, Site Kit by Google, and WooCommerce.
Can the Partytown configuration be modified?
Yes, the Partytown configuration can be modified via the plwwo_configuration filter. Not all configuration options can be serialized to JSON in this way; some, like resolveUrl, require an inline script.
Changelog
0.2.0
Enhancements
- Integrate Web Worker Offloading with Google Site Kit. (1686)
- Integrate Web Worker Offloading with Rank Math SEO. (1685)
- Serve unminified scripts when
SCRIPT_DEBUGis enabled. (1643)
Bug Fixes
- Fix tracking events like add_to_cart in WooCommerce integration. (1740)
0.1.1
Enhancements
- Add Web Worker Offloading meta generator. (1598)
0.1.0
- Initial release.
