F
F
Frezer2019-07-06 03:25:07
JavaScript
Frezer, 2019-07-06 03:25:07

How to identify a device?

How to identify the user's device on the site and then save this identifier to the server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Zhuk, 2019-07-06
@frazerto

1. If the task is to obtain a unique identifier for each browser / device that accesses the site, then Web Fingerprint technology is well suited for this.
You can read about it on the wiki .
Ready-made release on JS: https://github.com/Valve/fingerprintjs2
2. If you need to determine the type of device from which the user logged in (PC, iPhone, android smartphone), then you can look in the user agent, as a rule, there is information about user's browser and platform, use case in JS .
3. If the question is about storing the user's session identifier, then cookies or localStorage.

X
xmoonlight, 2019-07-08
@xmoonlight

Either this is an identifier using software and hardware implementation, or not at all.
The main thing: understand: "How necessary is this ?!"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question