How to get Device Information ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to get Device Information ?

I want to javascript/PHP code which are execute the device information like: Device Type Device model Browser etc. Anybody have idea ? How write code for get of above said device information.. Please say here Thanks in advance!

3rd Apr 2021, 3:16 AM
Sajid Ali
Sajid Ali - avatar
8 Answers
+ 2
document.write("Your Screen Size:"+screen.width+"X"+screen.height) document .write ("<br />") document .write ("Available W/H:"+screen.availWidth+"X"+screen.availHeight) document .write ("<br />") //some screen info by using JS document .write ("Inner W/H:"+window.innerWidth+"X"+window.innerHeight) document .write ("<br />") document .write ("Pixeldepth:"+screen.colorDepth) document .write ("<br />") document .write ("Chartset:"+document.charset) document .write ("<br />") document .write ("Browser name:"+navigator .appName ) document .write ("<br />") document .write ("Platform:"+navigator.platform) document .write ("<br />") document .write ("Online:" +navigator.onLine) document .write ("<br />")
3rd Apr 2021, 4:00 AM
SAN
SAN - avatar
3rd Apr 2021, 3:28 AM
SAN
SAN - avatar
+ 2
😭😭😭 try this:- document.write(navigator['appVersion'])
3rd Apr 2021, 3:52 AM
SAN
SAN - avatar
3rd Apr 2021, 3:22 AM
SAN
SAN - avatar
+ 1
Thanks bro 🙏
3rd Apr 2021, 4:43 AM
Sajid Ali
Sajid Ali - avatar
4th Apr 2021, 8:52 AM
VṢtēphen
VṢtēphen - avatar
- 1
ŚĄŃ [Exams] bai,, code is to much lengthy, I could not understand 😶
3rd Apr 2021, 3:24 AM
Sajid Ali
Sajid Ali - avatar
- 1
I need just specific things, Exmaple : Device Type Device model I dont need extra information of user Device
3rd Apr 2021, 3:31 AM
Sajid Ali
Sajid Ali - avatar