Get Browser Info
Returns information about the user's browser, including name, version, and user agent string.
Category | Functions |
Author | Polgubau |
Since | 1.0.0 |
Last Updated | 2025-03-17 |
Type | Sync |
Compatibility | Browser |
Example
Input
getBrowserInfo()
Output:
{ "name": "Chrome", "version": "112.0.0.0", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" }
Return
An object containing the browser's name, version, and the full user agent string.
Type: { name: string; version: string; userAgent: string }
Notes
This function works only in the browser environment where the `navigator.userAgent` property is available.
Tags
- browser
- user agent
- utilities