Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android, webview user agent vs browser user agent

I'm building my website and I want to know whether the user is using Android's browser or an app with a webview.

is it possible ??

like image 841
a fair player Avatar asked Oct 04 '12 12:10

a fair player


People also ask

Is user agent the same as browser?

Essentially, a user agent is a way for a browser to say “Hi, I'm Mozilla Firefox on Windows” or “Hi, I'm Safari on an iPhone” to a web server. The web server can use this information to serve different web pages to different web browsers and different operating systems.

What is a browser user agent?

A user agent is a computer program representing a person, for example, a browser in a Web context. Besides a browser, a user agent could be a bot scraping webpages, a download manager, or another app accessing the Web.

What is Chrome's user agent?

Latest Chrome User Agents. Chrome (Standard) Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36. Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36.


1 Answers

As per Chrome dev docs: "If you’re attempting to differentiate between the WebView and Chrome for Android, you should look for the presence of the Version/X.X string in the WebView user-agent string."

like image 172
Miguel Andres Avatar answered Sep 18 '22 18:09

Miguel Andres