title: Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED
body: <p>I searched Stack Overflow and Google for the specific error message in the title, but I did not find it (in the context of JavaScript coding, not browser settings). On my site, there are five functions that are called every 10 seconds. These functions do things such as:</p>
  
  <ol>
  <li>Check the user's inbox for new emails</li>
  <li>Check the user's account for new instant messages</li>
  <li>etc.</li>
  </ol>
  
  <p>However, if the user is logged in, but is INACTIVE (does not use the mouse or press any keys) for about 15 minutes, I get the following error message when I "Inspect Element" with Chrome:</p>
  
  <pre><code>Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED // (x 5)
  Uncaught Type Error: Cannot read property 'combinedfiletimeinput' of undefined //one of my previously defined form values is now not defined
  </code></pre>
  
  <p>At this point, the user's new email count, new IM count, etc. go blank (whereas they were integers before). All the user has to do is refresh the page or go to another page to reconnect, so it's not a huge deal.</p>
  
  <p>My hack solution is to use a JavaScript timer to automatically logout the user if there is not any of the following events in a 15 minute period:</p>
  
  <ol>
  <li>Mouse click</li>
  <li>Mouse movement</li>
  <li>Key press</li>
  </ol>
  
  <p>Is there a way to prevent this "Failed to load resource" error from occurring?</p>
  
  <p>UPDATE: This seems to occur when the user's device sleeps/hibernates while still logged on...when the user restarts the device. This is when the error message can be seen on Chrome's Inspect Element, Firebug, etc.</p>
  
  <p>UPDATE 10/02/2014: I have now condensed the five setTimeout functions into one large setTimeout function. In addition, the form that held the modify times in an input called "combinedfiletimeinput" has been removed and I now handle the file modify times differently. </p>
  
  <p>Here is a screenshot of the Chrome Developer Tools log showing the error. I have added "mysite" in place of my site's name and "filename" in place of the actual filename. I have also whited out the name of the external JavaScript file, and all that remains is .js (sorry, but I'm just trying to be careful :) ) I cut off some of the screenshot, so the text would be large enough to read.</p>
  
  <p><img src="https://i.stack.imgur.com/j8pSR.png" alt="Chrome Screenshot"></p>
  
  <p>As you can see by the screenshot, the request processes OK for the first three requests. Then I "sleep"ed my device and then turned my device back on. That's where the next two requests are errors (in red). After these first two errors, the requests begin to process normally again (rows with black text, after rows with red text). The console clearly shows the error message.</p>