title: Is there any way to refresh the page only for specific times in jquery
body: <p>I am using jquery to reload a page with the below code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
         setInterval(function() {
                window.location.reload();
                  }, 10000); 
    })
  &lt;/script&gt;
  </code></pre>
  
  <p>But i had some requirement, that i need to refresh the page only for 6 times, and display a message that "Something problem occurred"</p>
  
  <p>So how to refresh/reload a page only for specific times(6 in my case) using jquery ?</p>