userAgent
userAgent
輔助工具擴展了 Web Request API,提供額外屬性和方法來與請求中的使用者代理物件互動。
isBot
布林值,表示請求是否來自已知的爬蟲程式。
browser
包含請求中使用瀏覽器資訊的物件。
name
: 字串,表示瀏覽器名稱,若無法識別則為undefined
version
: 字串,表示瀏覽器版本,若無法識別則為undefined
device
包含請求中使用裝置資訊的物件。
model
: 字串,表示裝置型號,若無法識別則為undefined
type
: 字串,表示裝置類型,可能值為console
、mobile
、tablet
、smarttv
、wearable
、embedded
或undefined
vendor
: 字串,表示裝置製造商,若無法識別則為undefined
engine
包含瀏覽器引擎資訊的物件。
name
: 字串,表示引擎名稱。可能值包括:Amaya
、Blink
、EdgeHTML
、Flow
、Gecko
、Goanna
、iCab
、KHTML
、Links
、Lynx
、NetFront
、NetSurf
、Presto
、Tasman
、Trident
、w3m
、WebKit
或undefined
version
: 字串,表示引擎版本,若無法識別則為undefined
os
包含作業系統資訊的物件。
name
: 字串,表示作業系統名稱,若無法識別則為undefined
version
: 字串,表示作業系統版本,若無法識別則為undefined
cpu
包含 CPU 架構資訊的物件。
architecture
: 字串,表示 CPU 架構。可能值包括:68k
、amd64
、arm
、arm64
、armhf
、avr
、ia32
、ia64
、irix
、irix64
、mips
、mips64
、pa-risc
、ppc
、sparc
、sparc64
或undefined