Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 973 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 973 Bytes

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