Understanding WebViews


When it comes to accessing internet content, we typically use a browser like Chrome, Firefox, Safari, Internet Explorer, and Edge. You are probably using one of those browsers right now to read this article! While browsers are pretty popular for the whole task of accessing internet content, they have some serious competition that we probably never paid much attention to. This competition comes in the form of something known as a WebView. This article will explain all about what this mysterious WebView is and why it is sorta kinda cool.

This is a companion discussion topic for the original entry at https://www.kirupa.com/apps/webview.htm


This was an interesting article but as a user is there anything that I can do to make use of it? I hope you have follow on articles that will explain this to an average user like myself.


As a user, there isn’t much for you to do. You will just see it as part of your regular interactions with many apps.

As a developer, there is a ton. The amount of programmatic capabilities WebViews expose is enough to help you build a browser around one if you so choose. Talking about the developer story strays a bit too far from web technologies, so I may not take that route for some time.


Excellent article, Kirupa.

When I have developed Visual FoxPro applications for the desktop in the past, I have used the Web Browser control to employ Internet Explorer under the covers to incorporate web content into the desktop app.

Your article brings back fond memories as well as makes me think about the possibilities in the Internet of Things.



Visual FoxPro! That brings back memories…of seeing the box in my school! :sunny:


Now that web apps can be put on apps stores, is there much point in WebViews?
How many API’s are accessible only to native apps? It seems like most of these features are gradually being made available to the web.
How much slower is a hybrid app compared to a fully native app?


WebViews still play a role, and it depends greatly on the type of app you are building. You are right in stating that many native APIs are already available in the web layer, but many APIs - especially for custom device capabilities or ones that expose functionality from custom native components - will still require a way for web code to call into native code.

The performance gap between hybrid and fully native depends on the workload. In general, because hybrid apps involve one additional massive layer of abstraction (the web runtime) between what users see and the low-level hardware, you see a big hit in startup cost, memory used, and so on.


Thank you for this interesting article !
I consider hybrid applications with webviews as one of the most important applications on desktops too!
I use WebView from the JavaFX package unfortunately this has an old WebKit version as a base. It lacks a Chromium based WebView on the Desktop (Windows and Linux), so I would have to work with heavyweight Chromium Embedded Frameworks.
It would have a current WebViewer (by WebKit) for embedding in Deskstop applications are provided … someone knows a solution for this?


Would using Electron be an option? There isn’t a whole lot of investment to provide non-CEF solutions for cross-platform WebViews. This isn’t ideal for your case where you are using JavaFX as your app layer.