You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.
A functionality can be built to prevent the app from being opened in multiple tabs like WhatsApp web does. This is to cater the limitation that SSE can have only 6 concurrent tabs open at a time and also reduce connections per user with the server.
The text was updated successfully, but these errors were encountered:
Server-side solution: You can use a session-based mechanism on the server side, which will only allow one session per user. If the user tries to open the same site in another tab, the server will detect the existing session and redirect the user to the original tab.
JavaScript: You can use JavaScript to detect when a new tab is opened with the same URL and redirect the user back to the original tab.
Nice techniques!
Client side JS would be better as it would respond fast , and UX will be good
Tracking Sessions in server might not be a scalable solution as it will store the session data in the RAM and would bloat the server mem if many clients use the app + It would take some time in the req<-->res cycle
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A functionality can be built to prevent the app from being opened in multiple tabs like WhatsApp web does. This is to cater the limitation that SSE can have only 6 concurrent tabs open at a time and also reduce connections per user with the server.
The text was updated successfully, but these errors were encountered: