Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

isCrossDomainPageLoad check is missing protocol values #4845

zathrus-writer opened this Issue Aug 14, 2012 · 4 comments


None yet
4 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:" && href.search( /^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:") && href.search( /^https?:/ ) != -1 ),


gabrielschulhof commented Jun 11, 2014

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


gabrielschulhof commented Jun 11, 2014

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

Ruffio commented Dec 30, 2014

@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:") &&
reqUrl.search( /^https?:/ ) !== -1;


gabrielschulhof commented Jan 15, 2015

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!

@apsdehal apsdehal closed this Jul 7, 2016

@apsdehal apsdehal self-assigned this Aug 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment