Get Browser Info

Returns information about the user's browser, including name, version, and user agent string.

CategoryFunctions
AuthorPolgubau
Since1.0.0
Last Updated2025-03-17
TypeSync
CompatibilityBrowser

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

Related