C
C
Cloody2020-12-31 16:01:35
JavaScript
Cloody, 2020-12-31 16:01:35

How to track online/offline users in native google chrome extension?

Hello everyone, I'm developing an extension for google chrome and I need a function to track user activity (online / offline). This is necessary so that 1 user can use the extension during one session (if a user wants to use the extension on 2 computers at the same time, we must block it). Dear Khabrachani, could you tell me the best way to check user activity?
While there are ideas to do it through AJAX requests (requests at a certain interval) or through web sockets (io socket).

The extension works as follows:
The extension itself checks the user and sends a request to the server, which returns the main logic code and sews it onto the page (via eval).

Thanks for answers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antonwx, 2020-12-31
@antonwx

Yes, everything is very, very simple in fact, no complex tracking is even necessary. Do you have authorization in the extension? Well, cancel all previous sessions at the entrance. Thus, more than one session, in principle, will be impossible to create.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question