Android 版 Firefox 的 User Agent
Android 版 Firefox 报告设备真实的 Android 主版本号(低于 10 的报告为 10;此处的 16 只是示例),并在 Gecko/ 后面重复 Firefox 的版本号。它不发送机型。下面是 User Agent 字符串示例和每一段的含义。
Mozilla/5.0 (Android 16; Mobile; rv:158.0) Gecko/158.0 Firefox/158.0
一览
| 浏览器 | Firefox 158.0 |
| 内核引擎 | Gecko 158.0 |
| 操作系统 | Android 16 |
| 设备 | 手机 |
逐段拆解
| 片段 | 含义 |
|---|---|
Mozilla/5.0 | 历史兼容标记。几乎所有浏览器都自称 "Mozilla/5.0",以免老旧服务器返回残缺页面。 |
Android 16 | Android 16。 |
Mobile | 移动设备标记——网站据此返回移动版布局。 |
rv:158.0 | 修订/版本标记:158.0。 |
Gecko/158.0 | Gecko 引擎标记 158.0。桌面版 Firefox 固定为 20100101。 |
Firefox/158.0 | Firefox 浏览器,版本 158.0。 |
这个 UA 的其他形式
桌面模式
Mozilla/5.0 (X11; Linux x86_64; rv:158.0) Gecko/20100101 Firefox/158.0
在代码里使用
curl
curl -A "Mozilla/5.0 (Android 16; Mobile; rv:158.0) Gecko/158.0 Firefox/158.0" https://example.comPython (requests)
import requests
requests.get("https://example.com", headers={"User-Agent": "Mozilla/5.0 (Android 16; Mobile; rv:158.0) Gecko/158.0 Firefox/158.0"})Playwright (Node.js)
const context = await browser.newContext({ userAgent: "Mozilla/5.0 (Android 16; Mobile; rv:158.0) Gecko/158.0 Firefox/158.0" });
来源:Firefox user agent string reference · 核对于 2026年9月