$UserAgent

$UserAgent

gives the user agent information from an HTTP request that initiated the current evaluation.

Details

  • If the current evaluation was not initiated by an HTTP request, the $UserAgent is None.
  • $UserAgent is set not only for direct web calls such as those that use APIFunction or FormFunction, but also for interactive sessions that occur in the Wolfram Cloud Platform.
  • In web-based environment, $UserAgent is an association with the following properties:
  • "Name"browser or user agent name
    "Version"software version number of the user agent
    "OperatingSystem"operating system running the user agent
    "OperatingSystemVersion"version of the operating system running the user agent
    "Machine"name of the host machine, such as a mobile device model
    "MachineType"category of the host machine
    "MachineVersion"version of the host machine

Examples

Basic Examples  (1)

Publish a Delayed object to the cloud that shows the $UserAgent for the browser making the request:

In a browser, navigate to the object's URL:

Wolfram Research (2023), $UserAgent, Wolfram Language function, https://reference.wolfram.com/language/ref/$UserAgent.html.

Text

Wolfram Research (2023), $UserAgent, Wolfram Language function, https://reference.wolfram.com/language/ref/$UserAgent.html.

CMS

Wolfram Language. 2023. "$UserAgent." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$UserAgent.html.

APA

Wolfram Language. (2023). $UserAgent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$UserAgent.html

BibTeX

@misc{reference.wolfram_2024_$useragent, author="Wolfram Research", title="{$UserAgent}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/$UserAgent.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$useragent, organization={Wolfram Research}, title={$UserAgent}, year={2023}, url={https://reference.wolfram.com/language/ref/$UserAgent.html}, note=[Accessed: 22-November-2024 ]}