#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Location
    ma
    Posts
    0
    Rep Power
    0

    Question How to limit user to open just 1 browser window?


    The problem is:

    We need to limit the user to open just 1 browser window at a time to surf our members only pages after they login.

    For example: if they Login to members only pages with Netscape, then they try to open another Netscape window to play at my web pages at the same time. We need to force them to use only 1 browser window. How to do that?

    Thanks!

    Tom
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,815
    Rep Power
    4554
    I don't think you can and who cares if they do.

    All your web server sees is an http request. It can't tell what browser it's coming from. Setting cookies won't work either, b/c they'll be shared among the open browsers.

    You could possibly do something client side to disable it, but that's a question for another forum.

    ---John Holmes...
    -- Cigars, whiskey and wild, wild women. --
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Location
    Den Haag, Netherlands
    Posts
    69
    Rep Power
    16
    It is not clear why you would force your users to open just one window. I guess it is to force users to follow a sequence of pages, and not allow parallel sequences. For example, you don't want them to make two separate orders, but force them to make one combined order.

    That could probably be done using sessions, but even then, there might be a way to get around it. What if they login twice in your members section? I think it will be very hard, if not impossible, to force one window only.

    It might well be that the best solution is to rethink your strategy, and design such a solution that there is no problem if they open two windows. But again, it is not clear what reason there is to force this behaviour on your users.

    The easiest solution is to explain to the users why they should not open two windows, and hope for their cooperation.
    Code:
    Groetjes van Harry!   8-)
  6. #4

  7. Join Date
    Aug 2001
    Location
    NYC
    Posts
    57
    Rep Power
    17
    I know if you use frames on you page, and someone right-clicks to just open up a window w/in that frame, you can redirect them to another page (you might be able to configure the javascript to close that window altogether), but this is a javascript question...and like the others..why not let the user choose their browsing desire?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Location
    ma
    Posts
    0
    Rep Power
    0
    I know this sounds a little bit crazy, but it's a crazy special requirement to test people's techniques. I have no other way to survive.

    I'm praying for my gurus showing up. According to the best suggestions I have thus far.

    I have 2 choices which i've been trying but haven't succeeded yet:


    1. use a simple javascript function to handle it, close the 2nd window.
    2. use session / database to track the user. This is more complecated and it is most likely the way I finally have to go with.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,960
    Rep Power
    194
    you can add a page counter to your sessions.
    increment the page counter on each page, if the user opens a new window, he will send the same page number and you can tell him....

IMN logo majestic logo threadwatch logo seochat tools logo