title: Javascript redirect infinite loop
body: <p>Chrome is not redirecting to an intranet site. The body onload method is looping infinitely. If I change the target to an external website such as google.com, the redirection works. Can someone give pointers to find why is there an infinite loop for my intranet site?</p>
  
  <p>Below is my HTML</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;script type="text/javascript" src="openBrowser.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function openURL(){
      var targetURL="http://myintranetsite";
      openBrowser(targetURL);
  }
  &lt;/script&gt;
  
  &lt;BODY onLoad="openURL()"&gt;
      &lt;div id="loadBrowser"&gt;&lt;h1&gt;Opening Browser..&lt;/h1&gt;&lt;/div&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>my javascript</p>
  
  <pre><code>var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') &gt; -1;
  if(isChrome)
      {
          //Changes the URL to destination if the current chrome browser version is 40
          if(getChromeVersion()&gt;=40)
          {               
              window.location=targetURL;                                              
          }
  }
  </code></pre>