title: Javascript window.onload not working in iOS captive portal/network
body: <p>I've got this bit of code in the header of a jsp file. For some reason, it runs fine on desktop and mobile browsers, but on the iOS captive portal, only the first alert is triggered. Does anyone know why?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
    alert("first alert");
    window.onload = function() {
      alert("second alert");
    };
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>