Android Question Problem in webview when using loadhtml and loadurl


Active Member
Licensed User
Longtime User
I use okhttputils to POST to sever to get response then use webview.loadhtml(Job.GetString) to show on webview. If the return html contains ajax to do xmlhttp post to get data again from same web site, e.g. to publish a dropdown list, Chrome client still considers that is against CROS policy then block it. So no data comes back to dropdownlist.

I think that is because webview.loadhtml considers the received html as a local html, then call to original web site is considered as CROS.

I found work around to use webview.loadurl to access server to get back same response then the ajax works well. However I have to pass parameter by GET in url which does not look secure.

So the question is: could we have webview loadurl by POST method?