Skip to content


Subversion checkout URL

You can clone with
Download ZIP


isCrossDomainPageLoad check is missing protocol values #4845

zathrus-writer opened this Issue · 4 comments

3 participants


this line of isCrossDomainPageLoad check from jQuery Mobile 1.1.0 is missing a few values, preventing links to be automatically handled via the changePage() function:

isCrossDomainPageLoad = ( $.mobile.allowCrossDomainPages && documentUrl.protocol === "file:" && /^https?:/ ) != -1 ),

to fix this for BlackBerry and Windows Phone 7 at least, it should read:

isCrossDomainPageLoad = ( $.mobile.allowCrossDomainPages && (documentUrl.protocol === "file:" || documentUrl.protocol === "x-wmapp1:" || documentUrl.protocol === "local:") && /^https?:/ ) != -1 ),


Is this still an issue? Are there platforms where we're handling links via HTTP instead of handling them via Ajax?


The decision as to whether a request is cross-domain or not has been moved to path.js.


@gabrielschulhof Is this issue still relevant?

I find this in the code:

isPermittedCrossDomainRequest: function( docUrl, reqUrl ) {
return $.mobile.allowCrossDomainPages &&
(docUrl.protocol === "file:" || docUrl.protocol === "content:") && /^https?:/ ) !== -1;


Unforunately, it's difficult to test on either Windows or Blackberry. I've gone through the pain of doing Cordova on Windows when fixing #6574, and I believe I've burned up my free Windows development time in the process ... and I can't get the Blackberry simulator running on Linux for the life of me, especially since VMware has gone all out to require licenses and stuff.

If anyone has a setup for doing Cordova on Windows and/or Blackberry, please create a jQuery Mobile project consisting of two documents which link to one another. Then click the link which leads to the other document. This should cause jQuery Mobile to attempt to load the other document via Ajax. If this fails on either platform, please comment here. We can then debug together. TIA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.