In my application, i have some external urls to load, for which i am using a custom webview. but the performance of this webview is very very slow. If i open the same url in native android browser, it works fine. but in the webview, it just takes a lot of time to load the page. Is there anyway that the performance of a webview can be enhanced in terms of loading a webpage time? Help is always appreciated.
As most of the heavy lifting done by WebView is loading images. In our Web-Pages we tend to use many images and most of those images are really large in size and loading them every time the user opens the App's WebView is not good.
If we remove the engine part from the browser, we basically get a webview. When this engine is placed in a native app, we get a webview app. Basically, any app that loads content from a web page is a webview app. Use a mobile app builder for iOS and Android.
One of the most common uses for WebView is to display the contents within a link. Instead of launching a browser, switching the user from one app to another, and hoping for customer satisfaction, WebViews solve this problem by loading the contents of the link within the application.
No, Chrome for Android is separate from WebView. They're both based on the same code, including a common JavaScript engine and rendering engine.
Usama, WebViews will be little slower than the browser as here every activity has to have a callback to the Android app layer.
Having said that, see if you can disable javascript (if it's not used in your app) and more importantly check the caching behavior in the webview that has been set. WebSettings has some methods related to caching like - setAppCacheEnabled, setAppCacheMaxSize, setCacheMode etc.
setDatabaseEnabled, javascrpt, loadImagesAutomatically are other properties that might impact the load time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With