document.referrer is not returing anything.

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
P3
normal
RESOLVED WORKSFORME
17 years ago
15 years ago

People

(Reporter: Prashant Desale, Assigned: jst)

Tracking

({regression, top100})

Trunk
Future
regression, top100
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

17 years ago
document.referrer is not returing anything.

STEPS TO REPRODUCE:
1] Please visit above URL.
2] Click button "Open Another Window"

EXPECTED RESULTS:

Child window should show something like this 
document.referrer : http://bubblegum/desale/referrer.html

ACTUAL RESULTS:

Child window shows
document.referrer :
(Assignee)

Comment 1

17 years ago
Just a note to myself, this works in Netscape 4.x, but not in IE 5.
Status: NEW → ASSIGNED
OS: Windows 95 → All
Hardware: PC → All
Target Milestone: --- → mozilla0.9.1

Comment 2

17 years ago
We need document.referrer fixed for backward compatibility. It's there since 
Javascript 1.0, and it's served to NS clients from several top 100 pages, ie:
http://www.geocities.com/SunsetStrip/Backstage/7715/
http://www.lycos.com/feedback/
http://www.microsoft.com/insider/
...
Nominating for rtm.
Keywords: rtm

Updated

17 years ago
Keywords: top100
(Assignee)

Comment 3

17 years ago
Created attachment 18507 [details] [diff] [review]
Proposed fix.
(Assignee)

Comment 4

17 years ago
Ignore the last patch, it's only part of the fix...
(Assignee)

Comment 5

17 years ago
In 4.x document.referrer works at least when clicking on a link, in a frame
inside a frameset and also when doing window.open();

In IE it works when clicking on a link and in a frame inside a frameset but not
when doing window.open();

In mozilla it only works when clicking on a link, not in any other cases. I
doubt we'll be able to get this in for rtm, fixing this requires changes in a
number of places, it's not gonna be a trivial patch.

Comment 6

17 years ago
Marking rtm- based on Johnny's evaluation.
Whiteboard: [rtm-]

Comment 7

17 years ago
I would have to argue that document.referrer is working with buttons, but not 
working with links.  

- Go to this internal URL:  
http://bubblegum/browser/standards/dom1/tcmatrix/htmldocument.html
- Click on hdoc004.html

This test works in both Nav 4.x and in MSIE, but not in Netscape6.

Comment 8

17 years ago
document.referrer fails to work when you reload a page
(Assignee)

Comment 9

17 years ago
Created attachment 21521 [details] [diff] [review]
Proposed fix #2
(Assignee)

Comment 10

17 years ago
With the attached patch (#2) document.referrer works when clicking on links,
clicking on links that open in new window, window.open, framesets, reloading,
all cases I could think of. Looking for r= and sr=, anyone?
Whiteboard: [rtm-] → [rtm-][HAVE FIX]
Target Milestone: mozilla0.9.1 → mozilla0.8
(Reporter)

Comment 11

17 years ago
Nominating for nsbeta1, since nsbeta2,3, dogfood, rtm keywords are going to be 
cleared soon and important bugs could loose attention. I think this one deserves 
nsbeta1 nomination.
Keywords: rtm → nsbeta1
(Assignee)

Comment 12

17 years ago
Mitchell, could you review the last attachment in this bug?

Comment 13

17 years ago
Adding Patch, review and approval keywords to get this fix in hand some attention.
Keywords: approval, patch, review
looks good. As long as we continue to pass a principal as well as a referrer
through LoadInfo, the security will work all right. r=mstoltz
(Assignee)

Comment 15

17 years ago
Created attachment 23924 [details] [diff] [review]
Proposed fix #3 (use the URI of the caller as the referrer when doing window.open)
(Assignee)

Comment 16

17 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 17

16 years ago
I have downloaded the newest release, Netscape 6.01, and the document.referrer 
is still returning nothing.  This bug has NOT been fixed, and Netscape 6 is 
therefore still in violation of open standards.  

It is my strongest suggestion that Netscapse get with it and fix this and many 
other javascript related incompatibilities immediately, or lose any chance of a 
resurgence in the use of their browser by the mainstream web audience.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 18

16 years ago
ericshawn1@hotmail.com, did you test in netscape 6.01 or netscape 6.1? only
netscape 6.1 will have the fix. Netscape 6.01 was released before this bug was
fixed.
(please cc yourself on bugs on which you comment, thanks)
Netscape 6.1 hasn't been released yet. The fix was checked in on 2/2, sou you'll
need to use a Mozilla milestone release or daily build made after that date to
see this fix.

Methinks he doth protest too much.

Comment 20

16 years ago
http://bubblegum/browser/standards/dom1/tcmatrix/htmldocument.html hdoc004.html 
wfm in Mozilla 2001081703/win2k and NS6.1RTM/win2k. Recommend we mark this one
as fixed.

Comment 21

16 years ago
Marking as FIXED again because of the lack of proofs that this is not fixed.
ericshawn1@hotmail.com, please reopen if you come up with a site or testcase
that demonstrates that document.referrer does not work correctly. Thanks!
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago16 years ago
Resolution: --- → FIXED

Comment 22

16 years ago
works for me. verified with the testcase provided. adding keyword vtrunk
Keywords: vtrunk

Comment 23

16 years ago
This does not work on a local drive. Steps to reproduce: download from gila the
testcases and on first run you see the full path with file://fob.bar on a second
run it is empty. Win98 2001-12-08-08
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 24

16 years ago
This works now in the normal case, futuring for now...
Whiteboard: [rtm-][HAVE FIX]
Target Milestone: mozilla0.8 → Future
*** Bug 58675 has been marked as a duplicate of this bug. ***
Blocks: 79840

Comment 26

15 years ago
failed in build 01-27-08 win2k.

Comment 27

15 years ago
added the regression keyword, testcase passed in 6.2.1 RTM
Keywords: regression

Comment 28

15 years ago
Works for me, 2002 081209 on Windows 2000.  Bernd Mielke, file a new bug for the
file:// problem if you still see it.
Status: REOPENED → RESOLVED
Last Resolved: 16 years ago15 years ago
Keywords: vtrunk
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.