Title: Web Worker Offloading
Author: WordPress Performance Team
Published: <strong>3 Οκτωβρίου  2024</strong>
Last modified: 27 Φεβρουαρίου  2026

---

Αναζήτηση πρόσθετων

![](https://ps.w.org/web-worker-offloading/assets/banner-772x250.png?rev=3173091)

![](https://ps.w.org/web-worker-offloading/assets/icon.svg?rev=3173091)

# Web Worker Offloading

 Από [WordPress Performance Team](https://profiles.wordpress.org/performanceteam/)

[Λήψη](https://downloads.wordpress.org/plugin/web-worker-offloading.0.2.1.zip)

 * [Λεπτομέρειες](https://el.wordpress.org/plugins/web-worker-offloading/#description)
 * [Κριτικές](https://el.wordpress.org/plugins/web-worker-offloading/#reviews)
 * [Ανάπτυξη](https://el.wordpress.org/plugins/web-worker-offloading/#developers)

 [Υποστήριξη](https://wordpress.org/support/plugin/web-worker-offloading/)

## Περιγραφή

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](https://web.dev/articles/inp)(
INP) scores.

⚠ _This functionality is experimental, and **it is now [intended to be sunset](https://github.com/WordPress/performance/issues/2284)**._
⚠

In order 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 );
    ```

Unlike with the script loading strategies (async/defer), any inline before/after
scripts associated with the worker-offloaded registered script will also be offloaded
to the worker, whereas with the script strategies an inline after script would block
the script from being delayed.

Otherwise, the plugin currently ships with built-in integrations to offload Google
Analytics to a web worker for the following plugin:

 * [Rank Math SEO](https://wordpress.org/plugins/seo-by-rank-math/)
 * [Site Kit by Google](https://wordpress.org/plugins/google-site-kit/)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)

Please monitor your analytics once activating to ensure all the expected events 
are being logged. At the same time, monitor your INP scores to check for improvement.

This plugin relies on the [Partytown 🎉](https://partytown.builder.io/) library 
by Builder.io, released under the MIT license. This library is in beta and there
are quite a few [open bugs](https://github.com/BuilderIO/partytown/issues?q=is%3Aopen+is%3Aissue+label%3Abug).

The [Partytown configuration](https://partytown.builder.io/configuration) can be
modified via the `plwwo_configuration` filter. For example:

    ```
    <?php
    add_filter( 'plwwo_configuration', function ( $config ) {
        $config['mainWindowAccessors'][] = 'wp'; // Make the wp global available in the worker (e.g. wp.i18n and wp.hooks).
        return $config;
    } );
    ```

However, not all of the configuration options can be serialized to JSON in this 
way, for example the `resolveUrl` configuration is a function. To specify this, 
you can add an inline script as follows.

    ```
    <?php
    add_action(
        'wp_enqueue_scripts',
        function () {
            wp_add_inline_script(
                'web-worker-offloading',
                <<<JS
                window.partytown = {
                    ...(window.partytown || {}),
                    resolveUrl: (url, location, type) => {
                        if (type === 'script') {
                            const proxyUrl = new URL('https://my-reverse-proxy.example.com/');
                            proxyUrl.searchParams.append('url', url.href);
                            return proxyUrl;
                        }
                        return url;
                    },
                };
                JS,
                'before'
            );
        }
    );
    ```

There are also many configuration options which are not documented, so refer to 
the [TypeScript definitions](https://github.com/BuilderIO/partytown/blob/b292a14047a0c12ca05ba97df1833935d42fdb66/src/lib/types.ts#L393-L548).

## Συχνές Ερωτήσεις

### Why are my offloaded scripts not working and I see a 404 error in the console for `partytown-sandbox-sw.html`?

If you find that your offloaded scripts aren’t working while also seeing a 404 error
in the console for a file at `/wp-content/plugins/web-worker-offloading/build/partytown-
sandbox-sw.html?1727389399791` then it’s likely you have Chrome DevTools open with
the “Bypass for Network” toggle enabled in the Application panel.

### Where can I report security bugs?

The Performance team and WordPress community take security bugs seriously. We appreciate
your efforts to responsibly disclose your findings, and will make every effort to
acknowledge your contributions.

To report a security issue, please visit the [WordPress HackerOne](https://hackerone.com/wordpress)
program.

### How can I contribute to the plugin?

Contributions are always welcome! Learn more about how to get involved in the [Core Performance Team Handbook](https://make.wordpress.org/performance/handbook/get-involved/).

The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plugins/web-worker-offloading)
is located in the [WordPress/performance](https://github.com/WordPress/performance)
repo on GitHub.

## Κριτικές

![](https://secure.gravatar.com/avatar/0d8840f72405688ee43c6342dd72e944d722ea2e1a785e295acfdf1cf12bdb70?
s=60&d=retro&r=g)

### 󠀁[life saver](https://wordpress.org/support/topic/life-saver-487/)󠁿

 [princetajik](https://profiles.wordpress.org/princetajik/) 9 Φεβρουαρίου 2026 1
απάντηση

thank you, this is amazing. i had problem with google tag manager and analytics.
i used this + site kit plugin and my performance went from 70 to 99. if you wanna
setup tag manager/analytics manually, you should add type=”text/partytown” to the
script tag. like: <script type=”text/partytown”> tag manager code </script> and 
it works like a charm!

![](https://secure.gravatar.com/avatar/f3e8affc913a052d8be10e9eb76c708a5f311f322c554878121234a834922c74?
s=60&d=retro&r=g)

### 󠀁[Not sure](https://wordpress.org/support/topic/not-sure-22/)󠁿

 [KennyWilliamson](https://profiles.wordpress.org/kennywilliamson/) 26 Σεπτεμβρίου
2025 1 απάντηση

I uploaded and activated. I assume that as the plugin details state that rankmath
is integrated (rankmath has the option to load analytics locally- if i recall- which
may affect it), that i didnt actually have to do anthing. However my gt metrix score
deccreased, when i deactivated it went back up. So, at this point i cannot try on
complicated site (buddypress, bb forum, geo directory, etc)- which is a pity as 
mobile is really getting hit with google analytics, tag etc- its the reason i took
google ads off- it slows everyting way down. Anyway, just letting you know. Will
keep an eye on this. It would be really helpful if there was more docs (we arent
all developers)so we could think it through a bit more. Thanks Kenny

![](https://secure.gravatar.com/avatar/392fc315ceff5ccb972985e4655d19d32e636fd93dca2711ba140c29844d09db?
s=60&d=retro&r=g)

### 󠀁[Google Analytics and This = Does not work!](https://wordpress.org/support/topic/google-analytics-and-this-does-not-work/)󠁿

 [kenny](https://profiles.wordpress.org/wazone/) 12 Ιανουαρίου 2025 1 απάντηση

Problems with Google Analytics and Google Tag ManagerTested: 1 week. While Enabled:
No hits, no recorded live users/users in Google Analytics. Google Tag Manager also
didnt get to connect to the site. – Clarity did record users live, and page hits.
This is because Clarity is not included in the built-in integrationWhile disabled:
Google Analytics got hits right away – same with Google Tag Manager.

 [ Ανάγνωση όλων των 3 κριτικών ](https://wordpress.org/support/plugin/web-worker-offloading/reviews/)

## Συνεισφέροντες & Προγραμματιστές

“Web Worker Offloading” είναι λογισμικό ανοιχτού κώδικα. Οι παρακάτω έχουν συνεισφέρει
στη δημιουργία του.

Συντελεστές

 *   [ WordPress Performance Team ](https://profiles.wordpress.org/performanceteam/)
 *   [ WordPress.org ](https://profiles.wordpress.org/wordpressdotorg/)

Το “Web Worker Offloading” έχει μεταφραστεί σε 6 γλώσσες. Ευχαριστούμε τους [μεταφραστές](https://translate.wordpress.org/projects/wp-plugins/web-worker-offloading/contributors)
για τις συνεισφορές τους.

[Μεταφράστε το “Web Worker Offloading” στην γλώσσα σας.](https://translate.wordpress.org/projects/wp-plugins/web-worker-offloading)

### Ενδιαφέρεστε για την ανάπτυξη;

[Περιηγηθείτε στον κώδικα](https://plugins.trac.wordpress.org/browser/web-worker-offloading/),
ανατρέξτε στο [αποθετήριο SVN](https://plugins.svn.wordpress.org/web-worker-offloading/)
ή εγγραφείτε στο [αρχείο καταγραφής αλλαγών ανάπτυξης](https://plugins.trac.wordpress.org/log/web-worker-offloading/)
μέσω [RSS](https://plugins.trac.wordpress.org/log/web-worker-offloading/?limit=100&mode=stop_on_copy&format=rss).

## Σύνοψη αλλαγών

#### 0.2.1

 * Intend to sunset. ([2404](https://github.com/WordPress/performance/pull/2404))

#### 0.2.0

**Enhancements**

 * Integrate Web Worker Offloading with Google Site Kit. ([1686](https://github.com/WordPress/performance/pull/1686))
 * Integrate Web Worker Offloading with Rank Math SEO. ([1685](https://github.com/WordPress/performance/pull/1685))
 * Serve unminified scripts when `SCRIPT_DEBUG` is enabled. ([1643](https://github.com/WordPress/performance/pull/1643))

**Bug Fixes**

 * Fix tracking events like add_to_cart in WooCommerce integration. ([1740](https://github.com/WordPress/performance/pull/1740))

#### 0.1.1

**Enhancements**

 * Add Web Worker Offloading meta generator. ([1598](https://github.com/WordPress/performance/pull/1598))

#### 0.1.0

 * Initial release.

## Community plugin

Αυτό το πρόσθετο αναπτύσσεται και υποστηρίζεται από την κοινότητα. [Contribute to this plugin](https://github.com/WordPress/performance)

## Μεταστοιχεία

 *  Version **0.2.1**
 *  Τελευταία ενημέρωση: **πριν από 2 μήνες**
 *  Ενεργές εγκαταστάσεις: **20.000+**
 *  Έκδοση WordPress: ** 6.6 ή νεότερη **
 *  Δοκιμασμένο μέχρι: **7.0**
 *  Έκδοση PHP: ** 7.2 ή νεότερη **
 *  Γλώσσα:
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/web-worker-offloading/), 
   [English (US)](https://wordpress.org/plugins/web-worker-offloading/), [French (France)](https://fr.wordpress.org/plugins/web-worker-offloading/),
   [Persian](https://fa.wordpress.org/plugins/web-worker-offloading/), [Portuguese (Brazil)](https://br.wordpress.org/plugins/web-worker-offloading/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/web-worker-offloading/) και
   [Spanish (Spain)](https://es.wordpress.org/plugins/web-worker-offloading/).
 *  [Μεταφράστε στην γλώσσα σας](https://translate.wordpress.org/projects/wp-plugins/web-worker-offloading)
 * Ετικέτες:
 * [analytics](https://el.wordpress.org/plugins/tags/analytics/)[javascript](https://el.wordpress.org/plugins/tags/javascript/)
   [performance](https://el.wordpress.org/plugins/tags/performance/)
 *  [Σύνθετη Προβολή](https://el.wordpress.org/plugins/web-worker-offloading/advanced/)

## Αξιολογήσεις

 3 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/web-worker-offloading/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/web-worker-offloading/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/web-worker-offloading/reviews/?filter=3)
 *  [  2 2-star reviews     ](https://wordpress.org/support/plugin/web-worker-offloading/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/web-worker-offloading/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/web-worker-offloading/reviews/#new-post)

[Δείτε όλες τις κριτικές](https://wordpress.org/support/plugin/web-worker-offloading/reviews/)

## Συντελεστές

 *   [ WordPress Performance Team ](https://profiles.wordpress.org/performanceteam/)
 *   [ WordPress.org ](https://profiles.wordpress.org/wordpressdotorg/)

## Υποστήριξη

Έχετε κάτι να πείτε; Χρειάζεστε βοήθεια;

 [Φόρουμ υποστήριξης](https://wordpress.org/support/plugin/web-worker-offloading/)