detect-browser icon indicating copy to clipboard operation
detect-browser copied to clipboard

A JavaScript library to detect browser properties like browser name, device, OS, referrer, timezone, screen resolution and much more.

detect-browser

A JavaScript library to detect browser properties like browser name, device, OS, referrer, timezone, screen resolution and much more.

How to use

Add js file in src folder or wherever you like.
Add in html file where you want to detect browser properties.
Add after adding above code.

It will print browser info in console

List of properties available

info.language // browser language e.g en-US
info.languages // Gives Array of languages
info.user_agent // Gives User Agent
info.browser // Gives Browser name e.g Chrome
info.device // Gives Device e.g Mobile or Desktop
info.referer // Gives Referer
info.os // Gives User OS e.g windows 10 64-bit
info.online // Gives user online status true or false
info.timezone // Gives User Timezone
info.screen_resolution // Gives Screen Resolution e.g 1366 x 768
info.cookie_enabled // Gives Cookie enabled status true or false