title: javascript reload page every 5 seconds when browser is minimized
body: <p>Actually we Play a notification sound when some update happens in database, so I am trying to reload page every 5 seconds when browser in minimized, this works fine in Firefox , but in Chrome this doesn't work.</p>
  
  <p><strong>Scenario:</strong></p>
  
  <p>Minimize the browser and leave the computer idle.</p>
  
  <p>I have tried two methods:</p>
  
  <p><strong>Method 1:</strong></p>
  
  <pre><code>   &lt;meta http-equiv="refresh" content="5;URL=http://example.com/" /&gt;
  </code></pre>
  
  <p><strong>Method 2:</strong></p>
  
  <pre><code> &lt;script&gt;
  
     $(document).ready(function () {
  
     setTimeout(function(){
      window.location.reload(1);
      }, 5000);
  
      });
  
   &lt;/script&gt;
  </code></pre>
  
  <p>Any help would be great.</p>