Running AJAX from packed files (for example, the location " file : ///android_asset/www/index.html") works well, but does it from local files (for example, " cdvfile : //localhost/persistent/TEST/index.html ") does not.
I suppose this is due to policies of the same origin . Is there anything that can be done to make it work?
If I were reading files from the Internet, I would set up a web server to add the headers "Access-Control-Allow-Origin", but there is no web server. Using jsonp will work, but it will mean changing the code on the server and in the application.
This is testing on Android 4.1.2 and 4.4.2 using Phonegap 3.4.
source share