473,508 Members | 4,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window.location=... doesn't send referrer?

103 New Member
Hello

I have a script which records a click and then sends the user to the location. The idea is to keep nice links in the HTML but still do some javascript when the link is clicked.

I find that when using IE6 the page that is loaded doesn't register the referrer. in PHP - $_SERVER['HTTP_REFERER'] is null.

I'm using this simple code:

Expand|Select|Wrap|Line Numbers
  1. r = link.href;
  2. window.location = r;
  3.  
I want the referer to be sent - should I use an alternative method to load the page the user clicked on?

Thanks in advance!

Henry
Feb 1 '08 #1
2 8730
mrhoo
428 Contributor
document.referrer is the empty string if the request did not come from a link.
Otherwise, you could program a billion calls to an ad server page and retire.
Feb 1 '08 #2
henryrhenryr
103 New Member
Hi

Thanks for the reply. This certainly makes sense.

I have been testing a bit more and it seems internet explorer behaviour differs from Firefox.

The click originates from a link but I cancel the default action - ie the new page loading - to give time for my AJAX script to run. Then I send the user onwards. The differences is milliseconds.

With Firefox, the original refererrer is retained while with IE6 the referer is blank.

Does anyone know any way to mimic the Firefox behaviour in IE6?
Feb 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6821
by: Steven | last post by:
All I want to pop up a window before/during redirect to another page. Sort of a confirmation page: <? .... /* I need to pop up a window here */
10
14677
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
6
8507
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
5
7494
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
10
3321
by: Thad | last post by:
Any javascript I could try on this? I've got a popup window on my site with the browser chrome removed. Another site's gone ahead and done a popup to my same .html page. The visitor to that site...
1
5079
by: redneon | last post by:
I'm trying to add another button to a window's title bar to use as a "keep this window on top" button. I've managed to draw the button using the code below (C#) but I'm having a couple of other...
2
23479
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
6
9846
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
4
13063
by: Jeff Paffett | last post by:
I'm writing a file manager application using Ajax techniques and the client wants to be able to bookmark file searches. I send the search request to a remote server using a XMLHttpRequest and then...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.