A
A
Anton052021-07-03 11:11:31
Web development
Anton05, 2021-07-03 11:11:31

How to check if you have already logged in from this device?

I would like to validate a user when visiting my site. Whether he visited it today or not. I know several options, but I don't like them. 1. cookies - but in current browsers they can be deleted. 2. sessions - only 15 minutes and it turned out that they can also be deleted. 3. ip - the user can connect to another network. Are there any other options? For example, I wonder how advertising services for sites regulate the uniqueness of the user?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2021-07-03
Madzhugin @Suntechnic

cookie and this is the only option (you can session, because sessions are also cookies).
Cookies are designed specifically for this purpose, and if the user deletes them, then he does not want you to know that he visited your site. It's his right - respect him.

S
SKEPTIC, 2021-07-03
@pro100chel

1. Cookies. The option is good. Yes, they can be deleted, but a considerable number of users do not know this.
2. Sessions. This is almost the same as cookies. So we are not considering.
3.IP. In the modern world, this is almost not an indicator. Almost every house has a dynamic ip. Mobile constantly changes ip. For fun, I went to 2ip during the day. Almost every time there was a new ip.
There was an option from the browser fingerprint commentator. I don't know how things are with this now, but I read an article that said that some browsers began to deal with this in order to increase anonymity. So cookie
is still a good option. Yes, they can be deleted. More and more people are becoming aware of cookies as something sinister. How global corporations track them with the help of cookies.
Therefore, localstorage becomes another option. A small number of ordinary users know about it, so few people will climb on purpose to erase them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question