URL Referrer is NULL in IE6 and IE7

Posted on 2009-04-16
Last Modified: 2012-05-06
Problem:  Request.UrlReferrer property no longer contains page name.  We had a reliable website for over a year, up until about 6 months ago, using IE6 browser, where Request.UrlReferrer contained the web page name from where the call was made to current page.  No changes were made to our programs, so implication would be that some patch to IE6 or other change outside of our web app caused the UrlReferrer property to no longer contain the needed value when the new page is opened.  Found the following suggested fix on the internet:  It happen too on symantec client firewall. All we need to do is add the website in the trusted zone/permit all state to allow full access. I have tried the same and it worked.

We have added website in trusted zone.  No success.  What Microsoft patches or updates could have caused the property to suddenly loose, or have its value stripped away?  What other things could have a similar impact?

The code that is used to retrieve the value from the UrlReferrer property of the Request object is:

Dim sFromPage As String

sFromPage = Request.UrlReferrer.AbsolutePath

Then, if the value of sFromPage is not a blank string, the link is displayed. 

Request is invoked via a hyperlink; we are NOT using client-side scripting.

Page Source Code Includes Javascript:

<script type="text/javascript"> 


var theForm = document.forms['Form1'];

if (!theForm) {

    theForm = document.Form1;


function __doPostBack(eventTarget, eventArgument) {

    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {

        theForm.__EVENTTARGET.value = eventTarget;

        theForm.__EVENTARGUMENT.value = eventArgument;




// -->


Open in new window

Question by:jml12906
    LVL 15

    Expert Comment

    Is it only ie6 that has this issue? How does it work with Chrome or Firefox?

    Author Comment

    It is IE6 and IE7, ironically IE8 works fine as does Firefox.
    LVL 15

    Assisted Solution

    I can't reproduce this issue. I've just tried IE6 (6.0.2900.5512.xpsp_sp3_gdr.080814-1236) and used Wireshark to analyse the network traffic. It was sending the referer header as expected.

    What is interesting is that the code you have given would fall over if Request.UrlReferrer is null. Do you get a NullReferenceException, or is it specified but empty? (I don't think the latter is possible though)

    Accepted Solution

    My developer is going to try and see if she gets a nullreferenceexception. I appreciate the help
    LVL 23

    Assisted Solution

    Some people install plugins to block sending data like referrer for privacy reasons. Firewalls may do the same.

    You should never assume that its provided.

    Typing in a url into the browser ends up with no referrer as well.
    LVL 15

    Expert Comment

    Can you you post the solution as it will be of use for future EE users if they come across a similar problem to this?

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now