android - WebView: Differences between LoadUrl() and LoadDataWithBaseURL() -


i want load remote url haves ad. ad use javascript.

i using:

webview.loadurl("http://myurl.com") webview.getsettings().setjavascriptenabled(true); 

which differences exists if use:

webview.loaddatawithbaseurl("http://myurl.com", null, null, null, null) webview.getsettings().setjavascriptenabled(true); 

thanks

loaddatawithbaseurl() - loads given data webview, using baseurl base url content. base url used both resolve relative urls , when applying javascript's same origin policy. historyurl used history entry. ....

loadurl() - loads given url specified additional http headers.

see documentation - http://developer.android.com/reference/android/webkit/webview.html


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -