Support » Plugin: Progressive WordPress (PWA) » Problem with subdomain

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nico Martin

    (@nico_martin)

    Hi @alex845

    This won’t work. The ServiceWorker is installed for a specific scope. And a Subdomain is then outside that scope so it won’t be controlled by the ServiceWorker.
    You’d have to install a different ServiceWorker for the m. Subdomain. But thats not supported by this plugin.

    Kind regards,
    Nico

    Hi Nico,

    I fixed it, but I had to change a plugin file to do this ;-(

    In progressive-wp/Classes/class-offlineusage.php, line 196:

    $c .= ‘importScripts(\” . $plugin_uri . ‘assets/workbox-v3.4.1/workbox-sw.js\’);’;

    Changed into:

    $c .= ‘importScripts(\” . ‘https://m.mysite.com/wp-content/plugins/progressive-wp/assets/workbox-v3.4.1/workbox-sw.js\’);’;

    Best regards,
    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.