A JavaScript library to detect browser properties like browser name, device, OS, referrer, timezone, screen resolution and much more.
Add js file in src
folder or wherever you like.
Add <script type="text/javascript" src="path-to-your-file/detect-browser.js"></script>
in html file where you want to detect browser properties.
Add <script type="text/javascript"> var info = getBrowser(); console.log(info); </script> after adding above code.
It will print browser info in console
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