title: Error message on Chrome devtools: GET http://localhost/sw.js net::ERR_INVALID_RESPONSE
body: <p>Every time I run a local project on Google Chrome and inspect it with developer tools, I see this error. It doesn't really affect any functionality of my application, but it's annoying.</p>
  
  <p>The message will show from time to time, so that if I let the tab running for a while, the message appears multiple times.</p>
  
  <p><strong>Environment</strong></p>
  
  <p>I'm on Windows 10, running it on Google Chrome 51.0.2704.106 m.</p>
  
  <p><strong>Serving</strong></p>
  
  <p>I'm serving it from the command line with PHP-CLI (7.0.5) with the following command:</p>
  
  <pre><code>php -S localhost:8888
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <p>All the code for this dummy project is this following HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Error message&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p&gt;Hello error message.&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Developer tools: Console tab</strong></p>
  
  <p>Here is the output at Console tab on the developer tools:</p>
  
  <p><a href="https://i.stack.imgur.com/w84TV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w84TV.jpg" alt="Console output"></a></p>
  
  <p><strong>Developer tools: Network tab</strong></p>
  
  <p>Here is the output at Network tab on the developer tools:</p>
  
  <p><a href="https://i.stack.imgur.com/rav1r.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rav1r.jpg" alt="Network requests"></a></p>