This document aims to identify representative use cases of where WebViews are being used, regardless of the platform and type of device they're used on, identify the issues that arise from these usages and determine whether these issues can be addressed through improvements to the Web Platform, the surrounding ecosystem (e.g. documentation, testing frameworks) or through other mechanisms.
This is the skeleton of the core document on which the WebView Community Group will focus in its first phase of work.
The WebView Community Group aims to identify, understand and reduce the issues arising from the use of software components (typically referred to as [=WebViews=]) that are used to render Web technology-based content outside of a Web browser (native applications, MiniApps, etc).
This document contains sections describing the use cases that were contributed by multiple authors. Since this document is a group note, additional use cases will be added in future revisions of this document.
A native application (or native app) is an application designed to run on a particular operating system. It is written in native code and leverages native APIs exposed by the operating system. Typical examples include an iOS application written in Swift or Objective-C and that uses the iOS SDK, or an Android application written in Kotlin, Java or C++ using the Android SDK. [=native applications=] do not require a dedicated runtime to run as they interface with the operating system directly.
A web application (or web app) is an application written using Web technologies (URLs, HTML, CSS, JavaScript APIs). [=web applications=] typically run in a web browser runtime. All systems and devices that can render Web content have at least one system-wide Web browser application, which is either pre-installed on the device or that users can install.
WebViews are software components provided in an SDK that can be used to render Web content directly within a [=native application=] without having to switch to the [=system-wide Web browser=]. [=WebViews=] are used in a wide range of scenarios. They all share the same architecture: a [=native application=] embeds and interacts with one or more [=WebViews=] to render Web content within the [=WebView=].
[=WebViews=] can differ based on the following properties:
However, in practice, [=WebViews=] are classified into one of two categories with fixed properties:
The following table contains different [=WebView=] implementations with their different considerations
Category | Name | Platforms | Description | Features | Limitations | [=UX flexibility=] | Usage Example |
---|---|---|---|---|---|---|---|
[=Fully-fledged=] | Android WebView |
Android | Default WebView implementation on Android | Apps have [=access to the web content=] | Same features as in Chrome overall but some Web APIs are not supported | WebView may be resized and mixed with native content | Hybrid Frameworks (Cordova, Capacitor) |
[=Browser-like=] | Custom Tabs | Android | API for opening [=browser-like=] WebViews on Android | Browser navigation and convenience features like password autofill | No [=access to the Web content=] | Only minimal customization of the top bar possible | Link preview in social media Apps |
[=Browser-like=] | SFSafariViewController |
iOS, iPadOS | API for opening [=browser-like=] WebViews on iOS | Browser navigation and convenience features like password autofill | No [=access to the Web content=] | Only minimal customization of the top bar possible | Link preview in social media apps |
UIWebView (deprecated) |
iOS, iPadOS, macOS | Soon-to-be-removed WebView API of iOS | Apps have [=access to the web content=] | Some Web standards are not supported. Performance and security wise inferior to WKWebView ,
deprecated |
WebView may be resized and mixed with native content | Hybrid Frameworks (Cordova, Capacitor) | |
[=Fully-fledged=] | WKWebView |
iOS, iPadOS, macOS | Default WebView implementation on iOS | Apps have [=access to the web content=] | Same features as in Safari overall but some Web APIs are not supported | WebView may be resized and mixed with native content | Hybrid Frameworks (Cordova, Capacitor) |
[=Fully-fledged=] | WebView2 |
Windows | Default WebView implementation on Windows | Apps have [=access to the web content=] |
[=Hybrid apps=] combine elements of [=native applications=] and [=web applications=].
[=Web applications=] wrapped in a native container are an example of an [=hybrid app=]. This provides developers with a cross-platform mechanism to build a [=native application=]. When [=fully-fledged=] WebViews are used, the ability to [=access the web content=] may be leveraged to add native-like capabilities to the WebView.
Another example is In-App Browsers (IABs), which is a pattern for browsing links to web pages within a native application without leaving the application.
WebViews may be used to render the web content of a [=MiniApp=] page.
Features that are not supported by the WebView, or that run with limited performance (such as maps, videos, etc.), are typically replaced by native components that take care of the rendering.
For these reasons, [=fully-fledged=] WebViews are used in the [=MiniApp=] ecosystem, to allow for [=UX flexibility=] and [=access to the web content=].
Individual limitations and challenges linked to specific usage scenarios are detailed in . The following themes have emerged:
SFSafariViewController
for a more browser-like experience embedded in native Apps.