Blog

How WebViews Report Their Host Application

A large share of mobile browsing happens inside applications rather than in a standalone browser. The embedded component identifies itself, but only if the application chose to say so.

The embedded engine reports the system browser

An embedded view uses the platform's browser engine, so its string closely resembles the standalone browser's. Most of the tokens are identical.

Without an added token, an embedded view is difficult to distinguish from the real browser, which is exactly the situation for many applications.

Detection that reports the browser family is therefore usually correct while missing the more important fact that the page is inside an application.

Applications append their own identifier

Platforms let an application add to the string, and larger applications do, typically appending a name and version at the end.

Convention rather than specification governs the format, so each application does it differently and detection requires a rule per application.

Applications that add nothing are effectively invisible, which means the absence of an application token does not mean the page is in a real browser.

The distinction matters because behaviour differs

Embedded views frequently lack features the standalone browser has, including certain storage behaviours, installation prompts and window management.

They may also be configured differently by the host application, with restrictions the page cannot detect through identity alone.

Flows that break in this context tend to be authentication redirects, downloads and anything requiring the page to open a new window.

Capability tests still beat identification

Where the concern is whether a specific feature works, testing it is more reliable than recognising the application, because the restriction set varies by configuration.

Identification remains useful for the cases where a workaround must be chosen in advance, such as offering an explicit escape into the default browser.

Combining them works well: identify to explain the situation to the user, test to decide what the page actually does.

Handling it gracefully

The most useful pattern is a visible option to open the current page in the system browser when a flow is known to be problematic in embedded contexts.

That puts the decision with the user rather than depending on a detection rule keeping pace with every application's token format.

It also degrades safely for applications that add no token at all, since the option can be offered wherever the underlying capability test fails.