Closed
Bug 635604
Opened 14 years ago
Closed 14 years ago
document.location.href method seems not to use the "base" of an html document
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ssba5206, Unassigned)
Details
User-Agent: Opera/9.80 (Windows NT 6.0; U; ru) Presto/2.7.62 Version/11.01
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
For some reasons I sometimes create html "redirect" documents instead of soft OS links. Now I created one with a "base" element:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>A "link" page which redirects to the tw-node.</title>
<base href="../../.." />
</head>
<body>
<a HREF="0_d/innernet/TW nodes/chim.fiz.etc.html">TW-node to redirect into</a>
<script type="text/javascript">
document.location.href = "0_d/innernet/TW nodes/chim.fiz.etc.html";
</script>
</body>
</html>
I tested this in FF, Opera and IE. Only Opera redirects to
../../../0_d/innernet/TW nodes/chim.fiz.etc.html
while FF and IE redirect to
./0_d/innernet/TW nodes/chim.fiz.etc.html
I wonder which variant is due to standart, but the Opera behavior seems much more logical.
Reproducible: Always
Steps to Reproduce:
1. Create a document like the one described above.
2. Open it.
Actual Results:
Like I said, it redirects to ./0_d/innernet/TW nodes/chim.fiz.etc.html ("." is the folder which contains the "redirect" document).
Expected Results:
I expect to be redirected to
./../../../0_d/innernet/TW nodes/chim.fiz.etc.html
where ".." is the usual notation.
I don't use any extensions of FireFox.
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
Comment 1•14 years ago
|
||
In HTML 4, the "href" attribute of the <base> tag must be an absolute URI. Yours is clearly not, which is why Gecko 1.9.2 ignores it.
HTML 5 allows relative URIs for <base>, and Gecko 2.0 implements that.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
I see. So, waiting for the FireFox 4.0.
Thanks for your time and your help.
You need to log in
before you can comment on or make changes to this bug.
Description
•