Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the same id to client on reload #37

Open
marcuslindblom opened this issue Jun 18, 2017 · 2 comments
Open

Return the same id to client on reload #37

marcuslindblom opened this issue Jun 18, 2017 · 2 comments

Comments

@marcuslindblom
Copy link

Is it possible to get the same id to the client even when the user reloads the web page? I would like to send notifications even though the user has navigated away from the initial page.

@radu-matei
Copy link
Owner

There are several ways to accomplish this. FIrst of all, you need to keep some information about a user (id in a cookie for example). Then, keep a map of user ids and connection ids on the server.

Then, when you send a message to a connection id, send it to all connection ids associated to the user id.

@marcuslindblom
Copy link
Author

Ok, I see. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants