`

https://developers.google.com/chrome/mobile/docs/user-agent

阅读更多
Google Chrome for Android
Google Chrome
Google Chrome for Android

Documentation
Overview
Remote Debugging
User Agent
FAQ
Chrome for Android User-Agent

Chrome for Android reports its user agent string (UA) in the following formats, depending on whether the device is a phone or a tablet:

Phone UA:

Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>)
AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile
Safari/<WebKit Rev>
Tablet UA:

Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>)
AppleWebKit/<WebKit Rev>(KHTML, like Gecko) Chrome/<Chrome Rev>
Safari/<WebKit Rev>
Here's an example of the Chrome user agent string on a Galaxy Nexus:

Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile
Safari/535.19
For comparison, here are examples of other popular user agent strings:

Desktop Chrome: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19

Desktop Safari: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10

iPhone Safari: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3

iPad Safari: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10

For more information about Mobile Safari user agent strings, see this article.

User agent mechanics

Like all other browsers, Chrome for Android Beta sends this information in the User-Agent HTTP header every time it makes a request to any site. It’s also available in the client through JavaScript using the navigator.userAgent call.

If you are parsing user agent strings using regular expressions, the following can be used to check against Chrome for Android phones and Android tablets:

Phone pattern: 'Android' + 'Chrome/[.0-9]* Mobile'
Tablet pattern: 'Android' + 'Chrome/[.0-9]* (?!Mobile)'
分享到:
评论

相关推荐

    uni-app开发微信小程序 一、配置开发环境

    https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html 全部安装好后,首先配置Hbuilder 文件-新建-项目 选择uni-app后填写项目名称,选择文件目录,我这里直接选的默认模版自己开发。 填入...

    ffprobe-20190623-bc3306f-win64-static可执行文件

    WebP 1.0.2 &lt;https://developers.google.com/speed/webp&gt; x264 20190314-5493be8 &lt;https://www.videolan.org/developers/x264.html&gt; x265 20190618-b36c03e ...

    ethminer-0.16.0.dev3

    [-DHUNTER_ENABLED=OFF](https://docs.hunter.sh/en/latest/reference/user-variables.html#hunter-enabled) to configuration options. ### CMake configuration options Pass these options to CMake ...

    Python库 | nsl.stac-0.2.3.tar.gz

    资源分类:Python库 所属语言:Python 资源全名:nsl.stac-0.2.3.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    Atom-valhalla,Vala开发者的天堂(不再维护,请使用https://github.com/naaando/ide.zip

    Atom-valhalla.zip,Paradise for Vala developers (no longer maintained, please use https://github.com/naaando/ide-vala)这个包旨在将atom变成一个强大的vala ide。它在您编写代码时提供自动完成功能。您还可以...

    nodejs异步IO的实现 转:http://cnodejs.org/topic/4f16442ccae1f4aa2700113b

    Node.js是基于Chrome V8引擎的JavaScript运行环境,它的出现使得JavaScript得以在服务器端运行,为开发高性能的网络应用提供了可能。本文将深入探讨Node.js异步IO的实现,并结合给定的资源进行分析。 首先,异步I/O...

    ffplay-20190623-bc3306f-win64-static 可执行文件

    WebP 1.0.2 &lt;https://developers.google.com/speed/webp&gt; x264 20190314-5493be8 &lt;https://www.videolan.org/developers/x264.html&gt; x265 20190618-b36c03e ...

    protoc-gen-grpc-java-1.40.0-osx-aarch_64.exe

    &lt;organizationUrl&gt;https://www.google.com&lt;/organizationUrl&gt; &lt;/developer&gt; &lt;/developers&gt; &lt;connection&gt;scm:git:https://github.com/grpc/grpc-java.git&lt;/connection&gt; &lt;developerConnection&gt;scm:git:git@...

    Android代码-城市自动匹配的EditText,用的是Google Places

    FYI, There is SDK from Google for places (https://developers.google.com/places/android/start), but there is no support to get only cities without street names ("The (cities) type collection instructs ...

    用 Swift Perfact 开发服务器后端,你准备好了吗?! https://www.perfect.org/.zip

    用 Swift Perfact 开发服务器后端,你准备好了吗?... The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)

    一个简单的WebGL的demo,软件Chrome,硬件Google cardboard

    This is a basic virtual reality experiment for Chrome, to be used with #Cardboard#. It uses WebGL and #Three.js# to handle the 3D graphics and camera controls. See inline comments for tips. This code ...

    Beginning Swift Programming.pdf

    This book explains it all, helping developers master Apple’s new language. Become fluent with syntax that’s easier to read and maintain Understand inferred types for cleaner, less mistake-prone ...

    ffmpeg-2.5.2-win64-dev.7z

    WebP 0.4.2 &lt;https://developers.google.com/speed/webp/&gt; x264 20141220-git-40bb568 &lt;http://videolan.org/developers/x264.html&gt; x265 1.4 &lt;http://x265.org/&gt; XAVS svn-r55 &lt;http://xavs.sourceforge.net/&gt; ...

    小程序开发的概要介绍与分析

    - **支付宝小程序官方文档**:https://docs.open.alipay.com/mini/ - **支付宝小程序IDE**:https://marketplace.visualstudio.com/items?itemName=alibaba.paymentsdk #### 2. 在线教程与视频 - **腾讯云开发者...

    FFmpeg win64

    WebP 0.5.0 &lt;https://developers.google.com/speed/webp/&gt; x264 20160420-git-3b70645 &lt;http://videolan.org/developers/x264.html&gt; x265 1.9 &lt;http://x265.org/&gt; XAVS svn-r55 &lt;http://xavs.sourceforge.net/&gt; ...

    android环境搭建

    - [https://dl-ssl.google.com/android/repository/google_apis-8_r02.zip](https://dl-ssl.google.com/android/repository/google_apis-8_r02.zip) - ...

    Learning Spring Boot

    This book is aimed to help developers who are new to Spring Boot get up and running quickly in the arena of Spring app development. It is also for experienced Spring developers, as it shows how to ...

    ### 一套高质量的微信小程序 UI 组件库

    在开始使用 iView Weapp 之前,你需要先阅读 [微信小程序自定义组件](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/) 的相关文档。 ### 如何使用 到 [GitHub]...

Global site tag (gtag.js) - Google Analytics