don't open new window

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default don't open new window


    Is there the possibility of not permiting the user of opening
    two windows of the same web site?

    Thanks


    +---------------------------------------------+
    | Jayme Assuncao Casimiro |
    | Graduado em Ciência da Computação |
    | Estudante de Mestrado em Computação |
    | Universidade Federal de Minas Gerais - UFMG |
    +---------------------------------------------+

    Jayme Assuncao Casimiro Guest

  2. Similar Questions and Discussions

    1. Page_Load not fired when window.open used to load window.
      Hello John, Did you mean that the problem only happens after you upgrade to VS 2003 and framework 1.1? Does the problem exist in VS 2002 and...
    2. New Window Target doesn't open a new window inContribute but does in Firefox
      I have made the neccessary steps to allow a link to open in a new window by choosing "New Window" as the Target, and when testing the published page...
    3. window.open - resizing a window
      Is there a way to resize a window once it is opened through java:window.open I want to run a series of animations in a single window, however the...
    4. How to get a OPEN/SAVE dialog option window when open Excel from IE browser.
      I use the following to open Excel from IE browser, but I don't get a OPEN/SAVE dialog option window. Instead, the Excel opened in the browser...
    5. Open PDF in new window
      Hi I am developing my first asp appication (vbscript). I am storing cheques scans (in pdf format) in the file system along with the db on the...
  3. #2

    Default Re: don't open new window

    Jayme Assuncao Casimiro <jayme@dcc.ufmg.br> schrieb:
    > Is there the possibility of not permiting the user of opening
    > two windows of the same web site?
    No. You can't control the user and the users browser(s) and computer(s).

    Regards,
    Matthias
    Matthias Esken Guest

  4. #3

    Default Re: don't open new window

    Jayme Assuncao Casimiro:
    >
    > Is there the possibility of not permiting the user of opening
    > two windows of the same web site?
    No.

    André Næss
    André Næss Guest

  5. #4

    Default Re: don't open new window

    Matthias Esken wrote:
    >
    > No. You can't control the user and the users browser(s) and computer(s).
    Perhaps you could (with a complicated session-based tracker, or by
    tracking IPs), but the point is that you *should not* control the user's
    browser, that's not the purpose of a website!

    -adi

    Adi Schwarz Guest

  6. #5

    Default Re: don't open new window

    Adi Schwarz wrote:
    > Matthias Esken wrote:
    >
    >>
    >> No. You can't control the user and the users browser(s) and computer(s).
    >
    > Perhaps you could (with a complicated session-based tracker, or by
    > tracking IPs), but the point is that you *should not* control the user's
    > browser, that's not the purpose of a website!
    >
    > -adi
    I would say it's not even possible then. The client most probably caches
    the page and when a new window is opened just opens it from cache. You
    *may* be able to do it with JavaScript (if you are really anal, a
    combination of javascript and PHP), but again, there is no reason you
    should be limiting how many windows a client has open. You shouldn't care,
    your PHP code should be robust enough to handle submissions/track where a
    user is if they have multiple pages open, plus thats just one thing you
    should mess with. A users web-browser is personal. At the point you start
    making it impossible to do something, they get pissed. (Or do something
    for that matter, like pop-ups). Take my advice, leave the browser alone.


    -Eric Kincl
    Eric Kincl Guest

  7. #6

    Default Re: don't open new window

    *** Eric Kincl wrote/escribió (Fri, 21 Nov 2003 01:53:38 +0000):
    > I would say it's not even possible then. The client most probably caches
    > the page and when a new window is opened just opens it from cache.
    User can spoil any attempt just opening two browsers (Explorer and
    Mozilla)—given that he actually care. I normally leave annoying sites
    unexplored ;-)



    --
    --
    -- Ãlvaro G. Vicario - Burgos, Spain
    --
    Alvaro G Vicario Guest

  8. #7

    Default Re: don't open new window

    Eric Kincl <Eric@Kincl.net_NO_SPAM_> wrote in message news:<3fbd7022@news.gvsu.edu>...
    > Adi Schwarz wrote:
    >
    > > Matthias Esken wrote:
    > >
    > >>
    > >> No. You can't control the user and the users browser(s) and computer(s).
    > >
    > > Perhaps you could (with a complicated session-based tracker, or by
    > > tracking IPs), but the point is that you *should not* control the user's
    > > browser, that's not the purpose of a website!
    > >
    > > -adi
    >
    > I would say it's not even possible then.
    No. It's possible. As Adi said, you need complex session
    processing for that. BTW, I don't mean disabling "Open new window"
    option of browser---I mean if the user opens a new window, then prompt
    a error message or force log off.

    My bank ( [url]http://www.icicibank.com/[/url] )have such option. They won't
    allow you to use "Stop button", or "Refresh button" or "Ctrl+N" or
    "Open link in new window". If you do so, then they will force log off
    telling that it's for security purpose.

    ---
    "One who mix sports and patriotism is a barbarian"
    Email: rrjanbiah-at-Y!com
    R. Rajesh Jeba Anbiah Guest

  9. #8

    Default Re: don't open new window

    R. Rajesh Jeba Anbiah:
    > Eric Kincl <Eric@Kincl.net_NO_SPAM_> wrote in message
    > news:<3fbd7022@news.gvsu.edu>...
    >> Adi Schwarz wrote:
    >>
    >> > Matthias Esken wrote:
    >> >
    >> >>
    >> >> No. You can't control the user and the users browser(s) and
    >> >> computer(s).
    >> >
    >> > Perhaps you could (with a complicated session-based tracker, or by
    >> > tracking IPs), but the point is that you *should not* control the
    >> > user's browser, that's not the purpose of a website!
    >> >
    >> > -adi
    >>
    >> I would say it's not even possible then.
    >
    > No. It's possible. As Adi said, you need complex session
    > processing for that. BTW, I don't mean disabling "Open new window"
    > option of browser---I mean if the user opens a new window, then prompt
    > a error message or force log off.
    >
    > My bank ( [url]http://www.icicibank.com/[/url] )have such option. They won't
    > allow you to use "Stop button", or "Refresh button" or "Ctrl+N" or
    > "Open link in new window". If you do so, then they will force log off
    > telling that it's for security purpose.
    Well they can obviously do that because you have to log in and thus they can
    link all your actions to you as a person. But in the general case you don't
    have that luxury.

    But really, instead of disallowing the Stop, Refresh and CTRL-N buttons the
    bank should get a fucking clue and implement their system so that it can
    handle those sorts of things. Doesn't sound like a bank I would want to
    use. "Our security depends on the user's ability to not make mistakes.".
    Right.

    André Næss
    André Næss Guest

  10. #9

    Default Re: don't open new window

    [email]ng4rrjanbiah@rediffmail.com[/email] (R. Rajesh Jeba Anbiah) schrieb:
    > Eric Kincl <Eric@Kincl.net_NO_SPAM_> wrote in message news:<3fbd7022@news.gvsu.edu>...
    >
    >> I would say it's not even possible then.
    >
    > No. It's possible. As Adi said, you need complex session
    > processing for that. BTW, I don't mean disabling "Open new window"
    > option of browser---I mean if the user opens a new window, then prompt
    > a error message or force log off.
    >
    > My bank ( [url]http://www.icicibank.com/[/url] )have such option. They won't
    > allow you to use "Stop button", or "Refresh button" or "Ctrl+N" or
    > "Open link in new window". If you do so, then they will force log off
    > telling that it's for security purpose.
    Which information do they use for this? IPs can change (Proxy!) and
    browsers can change.

    Regards,
    Matthias
    Matthias Esken Guest

  11. #10

    Default Re: don't open new window

    Matthias Esken <muelleimer2003nospam@usenetverwaltung.org> wrote in message news:<bpll7c.1a4.1@usenet.esken.de>...
    > [email]ng4rrjanbiah@rediffmail.com[/email] (R. Rajesh Jeba Anbiah) schrieb:
    >
    > > Eric Kincl <Eric@Kincl.net_NO_SPAM_> wrote in message news:<3fbd7022@news.gvsu.edu>...
    > >
    > >> I would say it's not even possible then.
    > >
    > > No. It's possible. As Adi said, you need complex session
    > > processing for that. BTW, I don't mean disabling "Open new window"
    > > option of browser---I mean if the user opens a new window, then prompt
    > > a error message or force log off.
    > >
    > > My bank ( [url]http://www.icicibank.com/[/url] )have such option. They won't
    > > allow you to use "Stop button", or "Refresh button" or "Ctrl+N" or
    > > "Open link in new window". If you do so, then they will force log off
    > > telling that it's for security purpose.
    >
    > Which information do they use for this?
    I don't know about their implementation. The pages are in JSP. I
    think, they're doing this with session. Also, their system is somewhat
    buggy---sometimes the system fails to recognize the use of "Stop
    button" or "Refresh button" or "Ctrl+N"...

    Here is my simple, quick (but buggy) solution:

    <?php
    session_start();
    header('Cache-Control: no-store, no-cache, must-revalidate'); //don't
    cache the page

    if (isset($_SESSION[$_SERVER['PHP_SELF']]))
    {
    echo 'Error: You cannot see a page more than once or open more
    than one window.';
    }
    else //no problem...
    {
    $_SESSION[$_SERVER['PHP_SELF']] = 1;
    echo 'Hello, World!.';
    //show other contents...
    }
    ?>

    ---
    "There are two kinds of people, those who do the work and those who
    take the credit. Try to be in the first group; there is less
    competition there."---Indira Gandhi
    Email: rrjanbiah-at-Y!com
    R. Rajesh Jeba Anbiah Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139