Copy link to clipboard
Copied
Is it any way to check, if a web application is already running on clients computer. In other words how to prevent users to opens second instance of the same running application??
Copy link to clipboard
Copied
Perhaps checking the client IP address or use Websocket.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I don't have the answer, but I would explore Websocket. Internet is stateless; but Websocket allows us to maintain connections. Perhaps, you could take the advantage and apply it to the problem.
Copy link to clipboard
Copied
Thank you
Copy link to clipboard
Copied
Not sure what you mean.
The application (scope) only runs once. A user cannot force another application scope to open up, ColdFusion controls this. If no request is made within the timespan set for the application timeout, then the next request fires off the onApplicationStar() BIF automatically before the request BIFs are executed.
If you mean that you don't want them to have more than 1 browser open to the same website, I'm not sure that's going to cause any issues; as what was said before, the web is stateless. ie:
If I open Chrome, and in Tab 1 I goto home.cfm and in Tab 2 I goto home.cfm the to ColdFusion, it basically sees 2 requests to home.cfm made from (in essence) the same person (even though it doesn't know that until you implement some form of user tracking).
But even if a person logs into a website, the session data is shared for the browser or session (depending in how your sessions are setup) So even if he logs in on Tab 1, the next time he goes anywhere in Tab 2, it'll be when he's logged in. The 2 tabs share the same session data.