title: Why does Cordova 2.7.0 JS seemingly no longer work on remote pages?
body: <h1>Background</h1>
  
  <p>I'm attempting to upgrade an iOS app built on <a href="http://cordova.apache.org/">Cordova</a> 2.0 to version 2.7.</p>
  
  <p>It's basically a welcome screen that points to a remote search engine (please withhold comments about app validity and likely approval, as we're past that), and we were using the <a href="https://github.com/phonegap/phonegap-plugins/tree/master/iOS/ChildBrowser">ChildBrowser</a> plugin to enable opening links in a sub browser so as not to trap the user in the Cordova webview.</p>
  
  <p>Cordova 2.7 has a feature called <a href="http://cordova.apache.org/docs/en/edge/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a> I am hoping to use instead of ChildBrowser. InAppBrowser does essentially the same thing, aside from missing a button to open in Safari.</p>
  
  <h1>Problem</h1>
  
  <p>The existing app's remote webpages include the Cordova JS (as well as that for the ChildBrowser plugin) and it works fine for opening links in the sub browser.</p>
  
  <p>My test Cordova 2.7 app doesn't seem to load the Cordova JS correctly when it's being loaded from a remote web page.</p>
  
  <p>I tried using this exact same HTML on the embedded start page and a remote start page:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;script type="text/javascript" src="http://mydomain.com/mobile/cordova-2.7.0.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;script&gt;
        document.addEventListener("deviceready", onDeviceReady, false);
        function onDeviceReady() {
          alert("Ready!!");
        }
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>To test this as the embedded start page, I put this line in <code>config.xml</code>:</p>
  
  <pre><code>&lt;content src="index.html" /&gt;
  </code></pre>
  
  <p>When I run the app, I promptly get the "Ready!" alert.</p>
  
  <p>To test this as the remote start page (I'm aiming to <strong>link</strong> to the remote page in the final app, I am just using it as the start page for testing. The result is the same if I link from the embedded page.), I put this line in <code>config.xml</code>:</p>
  
  <pre><code>&lt;content src="http://mydomain.com/mobile/index.php" /&gt;
  </code></pre>
  
  <p>When I run the app, I just get the blank screen and no alert.</p>
  
  <p>Further, in <code>cordova-2.7.0.js</code> L. 6255, I changed</p>
  
  <pre><code>console.log('deviceready has not fired after 5 seconds.');
  </code></pre>
  
  <p>to</p>
  
  <pre><code>alert('deviceready has not fired after 5 seconds.');
  </code></pre>
  
  <p>With that change, running the app using the remote start page causes the blank page, and then after five seconds, I get the alert "deviceready has not fired after 5 seconds.". So this tells me Cordova JS is not starting correctly. Needless to say, I can't get InAppBrowser to launch links in the sub browser on the remote site, but I can get it working just fine on the embedded start page.</p>
  
  <p>Anyone have any ideas of where to go from here? This is a pretty simplistic example, so I'm assuming this is a Cordova settings problem or a change in the functionality. I appreciate any thoughts, thanks!</p>