0

I want to create a web page where I can detect the device name and model when visitor view this page from his/her device.

sohag513
  • 85
  • 1
  • 1
  • 9
  • You could use a third party api service like https://useragentinfo.co or see my answer here https://stackoverflow.com/a/44982837/395676. It could detect browser version, OS version and device type. – Ronnie Beltran Jan 30 '18 at 02:45

3 Answers3

2

This is not possible in javascript. It does not have the functionality to obtain that much personal information of the user. However, it does have the functionality to tell which browser user is using. These functionalities may be available in a framework like Phonegap but not in core javascript.

Please also refer to this page:

Getting (mobile) device name from javascript

Community
  • 1
  • 1
Inzamam Tahir
  • 515
  • 4
  • 16
2

You could use the ng-fone angular module that I wrote for an app to do this.

More details here: http://tphangout.com/?p=83

Raja Yogan
  • 918
  • 8
  • 16
1

You can use PHP Class which checks for user-agent to find device information.

One of most used class: http://mobiledetect.net/

This question was asked by another user: Simplest way to detect a mobile device

Community
  • 1
  • 1
Apul Gupta
  • 2,967
  • 3
  • 19
  • 29