Skip to main content
New Participant
July 31, 2013
Question

how to check if web application already running?

  • July 31, 2013
  • 2 replies
  • 863 views

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??

    This topic has been closed for replies.

    2 replies

    Inspiring
    July 31, 2013

    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.

    p_sim
    Participating Frequently
    July 31, 2013

    Perhaps checking the client IP address or use Websocket.

    New Participant
    July 31, 2013

    Multiple users could be coming through the same proxy, or route.

    p_sim
    Participating Frequently
    July 31, 2013

    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.