473,857 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

103 New Member

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;
I want the referer to be sent - should I use an alternative method to load the page the user clicked on?

Thanks in advance!

Feb 1 '08 #1
2 8829
428 Contributor
document.referr er 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
103 New Member

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

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 */
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 in VB. I've created an ASP interface where a user can select an email group that populates a listbox with those email addresses. If a user sees an email in that list that they do not want then they can remove it by clinking the Delete button...
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 all works fine. If the user selects "Open" or "Cancel", the window closes, which is the desired behavior. If they select "Save", the location dialog shows up, they save the file and the window remains open. I've tried a number of things to get...
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 IE. I link within a page and display individual divisions of that page, manipulating their visibility and display styles with an onClick function. As long as I explicitly click a link to progress, it works with browsers I've tried.
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 doesn't realize it unless he looks at the opener page's source code. I'm wondering if there's a javascript solution for this? I've tried using the window.opener.location.replace with the href being my absolute URL, and triggered by an onUnload...
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 problems... .... private bool buttonChecked = false; private int buttonSize = 16; private int buttonX = 226; private int buttonY = 6;
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 window to open a child window thru javascript window.open 2) I have some functionality in the child window that changes the data
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 'window.opener.location.reload(true);self.close();' but i need the parent window not to reload or else data that the user has already entered will be lost during the IsPostBack. I need the 'Apply' button on the popup to trigger the 'Update' button on the parent screen. The script ive seen...
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 write the search string to a # URL, either using window.location.href or window.location.hash. This works fine with no problems in IE and Firefox and works OK in Safari, except the browser goes into a permanent page loading state as soon as I...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.