-1

I am stuck while fetching client side information of their device, I didn't want to show my server device info to client.

I want whoever visit my site I get their mobile/laptop name, model, OS version, and all other info.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197

1 Answers1

1

I want whoever visit my site I get their mobile/laptop name, model, OS version, and all other info.

You can't (or rather: you're not meant to be able to).

Modern browsers are now designed to hide that information from web-pages to prevent spying and tracking users. This is also known as "device fingerprinting".

The only information you can get is in the User-Agent header, and I note that ultramodern browsers now no-longer update the User-Agent header and instead provide even less information through the "Client hints" headers.

Dai
  • 141,631
  • 28
  • 261
  • 374