title: Shared Worker not being loaded by Chrome (unless in incognito mode)
body: <p><strong>edit</strong></p>
  
  <p>Renaming the <code>shared-worker.js</code> file to anything else, e.g. <code>shared-worker-new.js</code>, seems to fix the issue. I have tried emptying the cache, restarting the browser and doing hard-reloads but <code>shared-worker.js</code> just doesn't want to work. The <em>new</em> worker file doesn't seem to suffer from caching issues. Changes to the file are instantly applied after a reload. Does anyone have any ideas as to why I can't use <code>shared-worker.js</code>?</p>
  
  <p><strong>/edit</strong></p>
  
  <p>I can't seem to load my Shared Worker in Google Chrome (67.0.3396.99). However when I switch to incognito mode it does work. Firefox (61.0.1) works fine in both regular and private mode. I've already tried disabling my browser plugins but that didn't work either.</p>
  
  <p>I have 3 files (in the same directory): <code>index.html</code>, <code>app.js</code> and <code>shared-worker.js</code>.</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Shared Worker Example&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script src="app.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>var worker = new SharedWorker('./shared-worker.js');
  
  worker.port.onmessage = function(message) {
      console.log('message from the shared worker:', message.data);
  };
  
  worker.port.start();
  worker.port.postMessage('Hello worker');
  </code></pre>
  
  <p><strong>shared-worker.js</strong></p>
  
  <pre><code>self.onconnect = function(connect) {
      var port = connect.ports[0];
  
      port.addEventListener('message', function(message) {
          port.postMessage(`I have received "${message.data}"`);
      });
  
      port.start();
  };
  </code></pre>
  
  <p>I am running the app via <code>php -S localhost:9000</code></p>
  
  <ul>
  <li>In Firefox the console outputs the following: <code>message from the shared worker: I have received "Hello worker"</code>. </li>
  <li>In an <em>incognito</em> Chrome tab I get the following output: <code>message from the shared worker: I have received "Hello worker"</code>.</li>
  <li>In a regular Chrome tab I get no output at all. </li>
  </ul>
  
  <p>I don't see the worker listed under Sources/Threads in the developer tools however when I load the shared-worker as a regular worker, i.e. <code>var worker = new Worker('shared-worker.js');</code>, it does appear. </p>
  
  <p>Why can't I load a Shared Worker in chrome, does anyone have any idea what is going on?</p>
  
  <p>Thanks a gazillion in advance!</p>