infinite loop of redirects




DOM: Core & HTML
15 years ago
3 years ago


(Reporter: Chris Howard, Unassigned)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [urispec], URL)



15 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624    AND  Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1


Causes the page to reload instead of taking the browser to 
http://servername/foldername/  (with no filename).   Quite often this type of 
quick redirection to the index of a site is used when the index page is changed 
often between index.htm, index.php, index.cgi and so on...

Reproducible: Always

Steps to Reproduce:
1. Use the following code (for cross browser compatability:
		function redirect() { window.location.href=""; }
		function timer() { setTimeout("redirect()", 0); }
2. load page.

Actual Results:  
infinite loop of page reloads

Expected Results:  
redirect user to http://servername/foldername/

Comment 1

15 years ago
---> DOM Level 0 for further comments and triage
Assignee: rogerl → dom_bugs
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → ashishbhatt
This has come up in the past; the question is what an empty URI resolves to
given the base URI of the current page.  I believe the correct answer is in fact
"uri of current page".

Comment 3

15 years ago
AFAICT, Boris is correct.  See point 2. in:

Comment 4

15 years ago
right, i think this bug is invalid per the spec.  however, it might be
interesting to know how IE and other browsers behave.

Comment 5

15 years ago
Boris is right, see also in RFC 2396:

13.2.C.2. Abnormal Examples

Although the following abnormal examples are unlikely to occur in normal
practice, all URI parsers should be capable of resolving them consistently. Each
example uses the same base as above.

An empty reference refers to the start of the current document.

<> = (current document)

But this has been handled differently in the past. Note the "current document"
not the "base uri". Older RFCs referred to the base uri instead AFAIK. So you
can expect some websites coded with a different result in mind based on older RFCs.

Comment 6

14 years ago
Is the destination of an empty href defined by specs anywhere?

The normal way of linking back home is href="./".
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:

Comment 8

12 years ago
Seems to be doing the same here (2005101209 Mac).  But where, oh where is the
relevant bit of the DOM spec?
OS: Windows 2000 → All
Hardware: PC → All
Assignee: general → nobody
QA Contact: ashshbhatt → general


7 years ago
Whiteboard: [urispec]

Comment 9

3 years ago
comment 5 is correct; an empty URI means the current document, not the current directory.
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.