Skip to main content

WebDeviceInfo

Information derived from navigator.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator

Inherits: DeviceInfo

Properties

  • app_code_name - The internal 'code' name of the current browser.
  • app_name - A string with the official name of the browser.
  • app_version - The version of the browser as a string.
  • browser_name - The name of the browser in use.
  • device_memory - The amount of device memory in gigabytes.
  • hardware_concurrency - The number of logical processor cores available.
  • language - A string representing the preferred language of the user, usually the language of the browser UI.
  • languages - A list of strings representing the languages known to the user, by order of preference.
  • max_touch_points - The maximum number of simultaneous touch contact points supported by the current device.
  • platform - A string representing the platform of the browser.
  • product - Always returns "Gecko", on any browser.
  • product_sub - The build number of the current browser.
  • user_agent - The user agent string for the current browser (e.g., 'Mozilla/5.0 ...').
  • vendor - The vendor name of the current browser.
  • vendor_sub - Returns the vendor version number (e.g., '6.1').

Properties

app_code_nameclass-attributeinstance-attribute

app_code_name: Optional[str] = None

The internal 'code' name of the current browser.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appCodeName

Note

Do not rely on this property to return the correct value.

app_nameclass-attributeinstance-attribute

app_name: Optional[str] = None

A string with the official name of the browser.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appName

Note

Do not rely on this property to return the correct value.

app_versionclass-attributeinstance-attribute

app_version: Optional[str] = None

The version of the browser as a string.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appVersion

Note

Do not rely on this property to return the correct value.

browser_nameinstance-attribute

browser_name: WebBrowserName

The name of the browser in use.

device_memoryclass-attributeinstance-attribute

device_memory: Optional[float] = None

The amount of device memory in gigabytes.

This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory

hardware_concurrencyclass-attributeinstance-attribute

hardware_concurrency: Optional[int] = None

The number of logical processor cores available.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency

languageclass-attributeinstance-attribute

language: Optional[str] = None

A string representing the preferred language of the user, usually the language of the browser UI.

Will be None if unknown.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language

languagesclass-attributeinstance-attribute

languages: Optional[list[str]] = None

A list of strings representing the languages known to the user, by order of preference.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages

max_touch_pointsclass-attributeinstance-attribute

max_touch_points: Optional[int] = None

The maximum number of simultaneous touch contact points supported by the current device.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints

platformclass-attributeinstance-attribute

platform: Optional[str] = None

A string representing the platform of the browser.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform

Note

Do not rely on this property to return the correct value.

productclass-attributeinstance-attribute

product: Optional[str] = None

Always returns "Gecko", on any browser.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/product

Note

Do not rely on this property to return the correct value. This property is kept only for compatibility purposes.

product_subclass-attributeinstance-attribute

product_sub: Optional[str] = None

The build number of the current browser.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/productSub

Note

Do not rely on this property to return the correct value.

user_agentclass-attributeinstance-attribute

user_agent: Optional[str] = None

The user agent string for the current browser (e.g., 'Mozilla/5.0 ...').

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent

vendorclass-attributeinstance-attribute

vendor: Optional[str] = None

The vendor name of the current browser.

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendor

vendor_subclass-attributeinstance-attribute

vendor_sub: Optional[str] = None

Returns the vendor version number (e.g., '6.1').

More info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendorSub

Note

Do not rely on this property to return the correct value.