Get HTTP_REFERER in popup

Discussion in 'ASP General' started by agflem@yahoo.ca, Jan 26, 2005.

  1. Guest

    Is there any way to grab the HTTP_REFERER server variable in a pop up?

    Example:
    www.site1.com pops open www.site2.com that needs to see if it was
    popped from www.site1.com

    Currently, that value is empty.

    If not, are there any suggestions on how to test that a page was
    spawned from a site and not just typed into the address bar?
    , Jan 26, 2005
    #1
    1. Advertising

  2. McKirahan Guest

    <> wrote in message
    news:...
    > Is there any way to grab the HTTP_REFERER server variable in a pop up?
    >
    > Example:
    > www.site1.com pops open www.site2.com that needs to see if it was
    > popped from www.site1.com
    >
    > Currently, that value is empty.
    >
    > If not, are there any suggestions on how to test that a page was
    > spawned from a site and not just typed into the address bar?
    >


    Some firewall and web filtering software, such as some versions of Zone
    Alarm, block HTTP_REFERER's by default.

    Personal Firewalls
    http://www.wykes.org/firewalls.html

    "This is because some firewalls block certain (harmless) interactions with
    this site. Some even block the transmission of http information, in direct
    contravention of the accepted standards."
    McKirahan, Jan 26, 2005
    #2
    1. Advertising

  3. Mark Schupp Guest

    On the client-side you could check for the existence of a parent window
    (window.opener). I don't know if you can get the URL of the opener if it is
    a different site however.

    --
    --Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com

    <> wrote in message
    news:...
    > Is there any way to grab the HTTP_REFERER server variable in a pop up?
    >
    > Example:
    > www.site1.com pops open www.site2.com that needs to see if it was
    > popped from www.site1.com
    >
    > Currently, that value is empty.
    >
    > If not, are there any suggestions on how to test that a page was
    > spawned from a site and not just typed into the address bar?
    >
    Mark Schupp, Jan 26, 2005
    #3
  4. Guest

    Ah, good idea :) Thanks Mark ... I added a server side work around too
    that checks for a key stored during login ... if there isn't a matching
    key when site2 is spawned ... window.close();
    , Jan 26, 2005
    #4
  5. wrote:
    > Is there any way to grab the HTTP_REFERER server variable in a pop up?


    I'm not sure what your workaround was, but this will do the job:

    <A HREF="http://www.site2.com/" TARGET="tgtWin"
    ONCLICK="window.open('',this.target, ...)">Click Me</A>



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jan 27, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Elliot M. Rodriguez
    Replies:
    1
    Views:
    643
    bruce barker
    Feb 12, 2004
  2. SStory

    HTTP_REFERER blank

    SStory, Feb 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,387
    Eric Lawrence [MSFT]
    Feb 28, 2004
  3. =?Utf-8?B?cHBhdGVs?=

    Request.ServerVariables ("HTTP_REFERER") using https

    =?Utf-8?B?cHBhdGVs?=, Mar 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,540
    Eric Lawrence [MSFT]
    Mar 3, 2004
  4. Troy

    Hit redirection & HTTP_REFERER

    Troy, Jun 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    622
    Joerg Jooss
    Jun 26, 2004
  5. Jens Peter Hansen
    Replies:
    7
    Views:
    511
    Randy Webb
    Jun 19, 2004
Loading...

Share This Page