Hello.

Interested in the following:

For example, I just went to the site without logging in. It is necessary at that time, while I am on the site, to issue an alert(0) , and if I’ve already left the site and then returned after n minutes / hours, I didn’t give out more.

Or easier. Vkontakte black windows come out when the user is on the site, and if he already left and then came, they do not get out.

Tell me how to approach this task?

  • one
    What does it mean to leave the site? - Snow
  • 2
    So he was there, and now he is no more. XD - knes
  • clarify the meaning of the word "gone." The user closed the site page or turned the browser and went to drink beer? The answer @knes does not shed light on this question, unfortunately. - iKuzko
  • @iKuzko, closed the site page :) - ModaL
  • one
    In this case, the answer from COOKIES is very good :) Questions about Vkontakte and the last name Durov ... makes you wonder :) - iKuzko

2 answers 2

COOKIES

  • Mm, but how to find out, for example, is the user on the site now or not? - ModaL
  • Without a login, you can only find out that SOMEONE is on your site. No more. Authorization needed, anyway. Another thing, it can also be crammed into cookies so that it happens once. - knes
  • @knes, and if like this: >> Or easier. Vkontakte black windows come out when the user is on the site, and if he already left and then came, they do not get out. - ModaL
  • @ Ruslan Durov, only @Pavel Durov knows this))) - Vfvtnjd
  • one
    @Ruslan_Durov, in general, it is impossible to enter VKontakte without authorization by definition. This is so for reference. - knes

Vkontakte node.js`ovsky socket.io