Skip to content

Ankit-29/webAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Detecting Browser and Its version

This code is based on the article from MDN. Where they gave a brief hint about various keywords that can be used to detect the browser name and device type (Mobile/Desktop).

MDN

The data shown in the image above is not sufficient for detecting all the browsers

e.g. userAgent of Firefox will have Fxios as a keyword rather than Firefox.

A few changes are also done to detect browsers like Edge and UCBrowser

The code is currently tested for the following browsers by changing userAgent with the help of dev-tools (How to change userAgent):

  • FireFox
  • Chrome
  • IE
  • Edge
  • Opera
  • Safari
  • UCBrowser