JQuery Mobile - loading error pages using PhoneGap and WP7.5 - security issue?

I have an application that works fine with phoneroid phone android 1.2 and jqm 1.0, and I'm trying to port it to Windows Phone 7.5.

When the index.html page loads, the first thing is to use the $ .mobile.loadpage file to load another html page. all I get in the wp7.5 application is the "Download Error" error message. if I put href on the index.html page, I get the same error. to summarize:

  • index.html works in the desktop browser.
  • Android application is running.
  • launching an application on wp7.5 without calling another page
  • jqm in ie (by wp7.5) can load other pages
  • If I contact the jqm public site from the application, the public site works (i.e. jqm will load the pages located on www)
  • I set $ .support.cors = true; in js code to allow xhr requests for cross site

it seems to me that the only problem is when jqm tries to load a local file via ajax. I assume this has something to do with the default security settings in a webbrowser control that uses telephony?

can anyone shed some light on this?

+4
source share
1 answer

I suspect that it is the insistence of WP7 that all pages loaded from the "local website" are actually loaded from IsolStorage.

The new Phonegap / Cordova WP7 project templates have a file supported for assembly, CordovaSourceDictionary.xml, which will do this for you. Just make sure that any files you want to use for upload / download (yes, you have to do this for images too) have a Build Actionion "Content" in your project, and when you create it, this xml will be updated automatically.

When your application launches the first thing that Cordoba does on WP7, browse all the files in this XML file and copy them to isolated storage so that they can be downloaded / moved.

0
source

Source: https://habr.com/ru/post/1382637/


All Articles