I have an android webview loading a website that I have locally in my assets. I\'ve not built it myself, and I have very little control over the markup, js etc.
Pro
You need to allow crossdomain. In this example, crossdomain is allowed for json values and for scripts.
$.ajaxPrefilter( "json script", function( options ) {
options.crossDomain = true;
});
Thanks for answer @njzk2, I've made it:
$.ajaxPrefilter( 'text', function( options ) { options.crossDomain = true; });
$.ajax({ url: source, type: 'GET', dataType: 'text'
Make it working in firefox, chrome and IE to load a local file ( not through any server )
I was personnaly lacking this parameter which target api 16 at least ( wondering if any other parameter could target any older API )
mWebView.getSettings().setAllowUniversalAccessFromFileURLs(true);
thanks