Question About Referrer Information

Discussion in 'Programming' started by qprojects, Aug 28, 2007.

  1. #1
    Hi, i would like to know that how can i change the referrer information while opening a page.
    For eg, a link to domain.com/page2.html is there from domain/com/page1.html If i click on that the referrer to page2 will be page1. How can i manipulate it to show page3 referred the user to page2.
    Any help will be appreciated :D
    Will this be done using php or javascript?
     
    qprojects, Aug 28, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    The referrer is sent by the browser, and there's no Javascript to change it. It can be faked (for example) using the cURL library, but it doesn't work on the client's side. Can you be more specific on what you're trying to accomplish?
     
    nico_swd, Aug 28, 2007 IP
  3. qprojects

    qprojects Peon

    Messages:
    1,901
    Likes Received:
    103
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i want this to be done on clients side. I want to manipulate the referrer and sometimes even make it blank. I will be opening different sites from my site, but i want no referrer info to be sent, or fake info to be sent.
     
    qprojects, Aug 28, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    I don't think that's possible with client side scripting alone. As said, the information is sent by the browser, and there's no way to modify this with Javascript. And the referrer is sent AFTER leaving the page, and you can't modify anything with client side scripts on YOUR site after the user has left it already.
     
    nico_swd, Aug 28, 2007 IP
  5. qprojects

    qprojects Peon

    Messages:
    1,901
    Likes Received:
    103
    Best Answers:
    0
    Trophy Points:
    0
    #5
    can i remove it by any means? like instead of href link, i make it to load in a new tab or window? if yes how?
     
    qprojects, Aug 28, 2007 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    nico_swd, Aug 28, 2007 IP
  7. qprojects

    qprojects Peon

    Messages:
    1,901
    Likes Received:
    103
    Best Answers:
    0
    Trophy Points:
    0
    #7
    no, i will be needing to redirect to many sites without giving referrer. .. :(
    i want no referrer, i know its possible, i have seen sumwhere, but dont remember :(
     
    qprojects, Aug 28, 2007 IP
  8. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #8
    As nico_swd has told you a number of times, it's NOT possible to FORCE no referrers...

    Having said that, I have a funny feeling that if you send a Javascript redirect it won't show a referrer but even then it's not really guaranteed to work like that in the future (plus you'll have problems with people who don't have Javascript enabled).
     
    TwistMyArm, Aug 28, 2007 IP