Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9

Thread: Referer in IE

  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Referer in IE

    Hello people, one quick question. I use the following code on one of my pages:

    <body bgcolor="#000000" scroll="auto" onclick="window.location='http://website.com/'">

    The referer is sent in FF but not in IE. What am I doing wrong?

    Thank you.

    By the way, I refuse to get the referer in a form and submit it using javascript. There must be a better way to fix this problem (like boycotting MS - lol).

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    <body style="background-color:#000;" onclick="window.location.replace='http://website.com/'">
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    <body style="background-color:#000;" onclick="window.location.replace='http://website.com/'">
    Doesn't work.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Then you likely have something blocking the referrers in IE.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    May 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    Then you likely have something blocking the referrers in IE.
    Sorry. Perhaps I was not clear. What I meant was that the link doesn't work at all. In other words, nothing happens when I click on the page (I am not redirected to http://website.com).

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Oh sorry. Try this instead
    Code:
    onclick="window.location.replace('http://website.com')"
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    arabab (09-21-2007)

  • #7
    New Coder
    Join Date
    May 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    Oh sorry. Try this instead
    Code:
    onclick="window.location.replace('http://website.com')"
    It still doesn't report the referer in IE. But thanks for the help anyways.

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Do you have any type of security software, zone alarm perhaps?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #9
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Is the page the code is on a secure page (using https:// ) - if so then IE doesn't ever pass the referrer to non secure pages called from there.

    Most browsers and firewalls make it easy to turn off the referrer field and many people do so to help protect their privacy. The field should therefore not be reliied on for anything as more and more often it will be blank.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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