From f9f3b22a5bda7d4b44a5e098b858c07073857fd3 Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Mon, 2 Jun 2025 23:47:32 +0200 Subject: [PATCH 1/6] rewrite definition to start discussion --- README.md | 2 +- index.html | 99 +++++++++++++++++++++++++++++------------------------- 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 7a8f7df..ee898f4 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# webview-definition +# WebView Definition Explainer diff --git a/index.html b/index.html index 4b2a84f..804bdd1 100644 --- a/index.html +++ b/index.html @@ -31,21 +31,45 @@
-

This document aims to define WebViews

+

Abstract

+

This document aims to define what a WebView is.

+

+ This document is a work in progress. It is intended to provide clarity on the definition of a WebView, which has been a topic of discussion within the WebView Community Group. +

-
-

Web Browser vs. WebView Definition

+
+

Introduction

+

+ The WebView Community Group has identified a lack of clarity and consensus around the definition of a WebView. This has + led to confusion among developers and users alike, as the term is often used inconsistently across different platforms + and contexts. +

- The WebView CG identified a need to come up with a definition to clearly identify a web browser vs. WebView. This was discussed via email - here. + Non-goal: The purpose of this document is to define what a WebView is. It does not attempt to categorize or define different types of WebViews (see the usages and challenges explainer for that). + +

+
+
+

How do WebViews differ from other user agents, such as browsers?

- Here is my attempt to summarise the discussion. Let me know if I missed anything important from the email discussion in this summary. Note that the goal here is only to define a web browser vs. webview, and not to define different types of webview (see #19 for that). + This was discussed via e-mail. WebViews are usually locked down and configured by apps embedding them to fit their use case. Sometimes they are used to build fully featured browsers or show general web content.

-
-

Use Cases Discussed

+
+

WebView User Experience

+
    +
  • Whether the user can enter their own URL to navigate to
  • +
  • "Embedded" (e.g. WKWebView) vs "System" (e.g. Custom Tabs) WebViews, which differ by whether they run in a separate context, or the same context as a web browser on the device
  • +
  • Whether the user may "freely navigate the web" (i.e. browsing, since they are called "web browsers" after all)
  • +
  • Whether certain UX features are available (e.g. managing security and privacy, back/forward button, bookmarks...)
  • +
+
+
+

Use Cases

  • Web browsers (e.g. Chrome, Firefox, Safari)
  • In-app browsers like Android Custom Tabs, SFSafariViewController
  • @@ -57,50 +81,35 @@

    Use Cases Discussed

  • A web browser in private browsing mode
-
-

Definitions Discussed

-

- A specification's definition of a webview should not refer to specific technologies like Android WebView or WKWebView. The general consensus appeared to be the definition should focus on how the web content is used. Definitions discussed included: -

-
    -
  • Whether the user can enter their own URL to navigate to
  • -
  • - "Embedded" (e.g. WKWebView) vs "System" (e.g. Custom Tabs) WebViews, which differ by whether they run in a separate context, or the same context as a web browser on the device -
  • -
  • Whether the user may "freely navigate the web" (i.e. browsing, since they are called "web browsers" after all)
  • -
  • Whether certain UX features are available (e.g. managing security and privacy, back/forward button, bookmarks...)
  • -
-
-
+

Additional Points Raised

    -
  • In-app browsers like SFSafariViewController are usually virtually identical to a regular web browser, differing only by user interface
  • +
  • In-app browsers like SFSafariViewController are usually virtually identical to a regular web browser, differing only by user interface.
-
-

Proposed Definition

+
+
+

Proposed Definition

+
+

What is a WebView?

- In conclusion I would propose that the definition of a web browser is where the user may freely navigate the web. What identifies a WebView is the fact that navigation is restricted to a certain set of content that the app developer wishes to provide, and therefore free navigation of the open web is not allowed. + A WebView is defined as a software component that is used to render Web technology-based content outside of a Web browser (Native Apps, MiniApps, etc). +

+

+ If you look at how the web content is used—for example, if you can freely navigate the web or certain UX elements exist—you could determine which type of WebView and whether who the user agent is. +

+ + +
+
+

User Agent Considerations

+

+ Whether a WebView is a user agent or not is difficult to tell. In cases where a WebView acts as a general-purpose browser, it could be considered a user agent.

-

Web Browser

-

Under this definition, things that count as a web browser include:

-
    -
  • Web browsers like Chrome, Firefox and Safari
  • -
  • Web browsers in private browsing mode
  • -
  • Web browsers with browser extension that do things like intercept network requests
  • -
  • A web browser built using an embedded WebView (as the purpose of the app is to allow free navigation of the web) - resolving #41
  • -
  • - In-app browsers like Android Custom Tabs and SFSafariViewController - despite the fact these do not show an editable URL bar, they typically function like web browsers in every other respect, including allowing free navigation through links in the web content -
  • -
-

WebView

-

Under this definition things that count as a WebView include:

-
    -
  • WebView embedded in app (e.g. Android WebView or Microsoft Edge WebView2 as a view inside an app)
  • -
  • A web browser in "kiosk" mode (as navigation is restricted) - this is a tricky one to define either way but in my opinion this is an appropriate categorisation
  • -

- Whether web content uses an iframe does not affect this definition, as it essentially only takes in to account how the top frame is used. For clarity perhaps this should be incorporated in to the definition, i.e. "in a web browser the user may freely navigate the web in the top frame of the browsing context". + If a WebView is used in such a way that it's not transparent to the user that they are interacting with web content or the app embedding the WebView is interacting with the Web content, it's less clear if all duties of a user agent are fulfilled, and the embedding app might become the user agent.

From ac23fa81ba507a563c06d3cc0a98c3082fcdcafb Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Tue, 3 Jun 2025 08:16:30 +0200 Subject: [PATCH 2/6] deploy preview --- .github/workflows/preview.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..f73eb70 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,23 @@ +name: Deploy PR previews + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./ \ No newline at end of file From 4c405ee900e47fb84bd8280f1142b0359602e358 Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Thu, 5 Jun 2025 20:12:46 +0200 Subject: [PATCH 3/6] Update wording of WebViews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: エリス --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 804bdd1..799eebd 100644 --- a/index.html +++ b/index.html @@ -63,7 +63,7 @@

How do WebViews differ from other user agents, such as browsers?

WebView User Experience

  • Whether the user can enter their own URL to navigate to
  • -
  • "Embedded" (e.g. WKWebView) vs "System" (e.g. Custom Tabs) WebViews, which differ by whether they run in a separate context, or the same context as a web browser on the device
  • +
  • "Embedded" Web Views vs "Delegated" Browser Views, which differ by whether they run in a separate context, or the same context as a web browser on the device
  • Whether the user may "freely navigate the web" (i.e. browsing, since they are called "web browsers" after all)
  • Whether certain UX features are available (e.g. managing security and privacy, back/forward button, bookmarks...)
From c60fdf0a1f24fd5b1ba34f168c6e5ae2c6f70215 Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Thu, 5 Jun 2025 21:02:47 +0200 Subject: [PATCH 4/6] add types and refactor some small bits --- index.html | 70 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 799eebd..e48945e 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - WebView Definition + WebView Explainer @@ -47,17 +54,14 @@

Introduction

and contexts.

- Non-goal: The purpose of this document is to define what a WebView is. It does not attempt to categorize or define different types of WebViews (see the usages and challenges explainer for that). - -

+ Non-goal: The purpose of this document is to define what a WebView is and which types of WebViews exist. It is not intended to provide a comprehensive overview of all WebView implementations or their specific features. + You can find more information about the implementations in the usage and challenges report.

How do WebViews differ from other user agents, such as browsers?

- This was discussed via e-mail. WebViews are usually locked down and configured by apps embedding them to fit their use case. Sometimes they are used to build fully featured browsers or show general web content. + This was discussed via e-mail in the WebView CG. WebViews are usually locked down and configured by apps embedding them to fit their use case. Sometimes they are used to build fully featured browsers or show general web content.

WebView User Experience

@@ -96,14 +100,14 @@

What is a WebView?

A WebView is defined as a software component that is used to render Web technology-based content outside of a Web browser (Native Apps, MiniApps, etc).

- If you look at how the web content is used—for example, if you can freely navigate the web or certain UX elements exist—you could determine which type of WebView and whether who the user agent is. + If you look at how the web content is used—for example, if you can freely navigate the web or certain UX elements exist—you could determine which type of WebView and whether who the user agent is.

-
-
+

User Agent Considerations

Whether a WebView is a user agent or not is difficult to tell. In cases where a WebView acts as a general-purpose browser, it could be considered a user agent. @@ -113,5 +117,47 @@

User Agent Considerations

+
+

Types of WebViews

+ +
+

WebView Properties

+

[=WebViews=] can differ based on the following properties:

+

+

    +
  • UX flexibility: Whether + the native application has full control over the UX provided by the WebView or whether the WebView imposes + the UX with limited customization and control from the native application.
  • +
  • Access to the web content: Whether the + native application has the ability to read and modify the web content rendered in the WebView. The native + application can leverage this to establish a communication link between the native code and the Web code, and + in particular to expose native APIs to the Web content, making it possible for the Web content to make native + calls.
  • +
  • State sharing: Whether the WebView shares state such as + cookies and cache with the system-wide web browser, or is completely isolated.
  • +
+

+
+
+

WebView Categories

+

In practice, [=WebViews=] are classified into one of two categories with fixed properties:

+
+
Browser-like WebViews
+
These WebViews are straightforward to embed with a simpler API surface mostly targeted at loading the web + page. They are generally not [=flexible=], do not provide [=access to the web content=], but [=share state=] + with the system-wide web browser.
+
Fully-fledged WebViews
+
These WebViews are used for creating richer experiences and feature powerful integration primitives. They + have full [=UX flexibility=] when integrated within an application, provide the ability to [=access the web + content=] (native and web parts of the application can communicate), and do not [=share state=] with the + system-wide web browser.
+
+
+ + +
+
From 07ad8ce898f76910a28638ee9bded10a55a0ec3c Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Fri, 6 Jun 2025 08:49:49 +0200 Subject: [PATCH 5/6] fix action version --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index f73eb70..5d54d8b 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -18,6 +18,6 @@ jobs: uses: actions/checkout@v4 - name: Deploy preview - uses: rossjrw/pr-preview-action@v1 + uses: rossjrw/pr-preview-action@2fb559e4766555e23d07b73d313fe97c4f8c3cfe with: source-dir: ./ \ No newline at end of file From a5193d686f5858090417b40106e75515d231a0ac Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Fri, 6 Jun 2025 15:23:20 +0200 Subject: [PATCH 6/6] fix typo --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e48945e..6b0b34e 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@

How do WebViews differ from other user agents, such as browsers?

WebView User Experience

  • Whether the user can enter their own URL to navigate to
  • -
  • "Embedded" Web Views vs "Delegated" Browser Views, which differ by whether they run in a separate context, or the same context as a web browser on the device
  • +
  • "Embedded" WebViews vs "Delegated" Browser Views, which differ by whether they run in a separate context, or the same context as a web browser on the device
  • Whether the user may "freely navigate the web" (i.e. browsing, since they are called "web browsers" after all)
  • Whether certain UX features are available (e.g. managing security and privacy, back/forward button, bookmarks...)