redirection via javascript and meta are both honored!!!

VERIFIED INVALID

Status

()

Core
JavaScript Engine
VERIFIED INVALID
15 years ago
7 years ago

People

(Reporter: Nikolay, Assigned: rogerl (gone))

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

the following sniffer script used to detect weather a browser has javascript or
not fails in Mozilla although it does work under opera and IE. When you visit
the page you can see that it first goes to #bothjavascriptandjava but after 2
seconds redirects to #nojavascriptorjava

:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.1 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Getting Browser Capabilities</title>
<meta content="2;url=#nojavascriptorjava" http-equiv="refresh">
<script type="text/javascript"><!--
if ( navigator.javaEnabled() )
{
  document.location = "#bothjavascriptandjava"
}
else
{
  document.location = "#onlyjavascript"
}

//--></script>
</head>
<body>Getting your browser capabilities!</body>
</html>


Reproducible: Always

Steps to Reproduce:
1.open the given html in Mozilla
2.
3.

Actual Results:  
it redirects to #bothjavascriptandjava but after 2 seconds redirects to
#nojavascriptorjava

Expected Results:  
it should have stayed at #bothjavascriptandjava
(Reporter)

Comment 1

15 years ago
Created attachment 118767 [details]
for convenience here is the actual script

just open this one

Comment 2

15 years ago
I'm seeing the same behavior in Mozilla and IE6.  Why are you expecting the meta
refresh not to be honored?

Not a blocker, reducing severity
Severity: blocker → normal
(Reporter)

Comment 3

15 years ago
well...I am actually using XSL to generate the given HTML and the destinations 
are not actually "#link" style links. In IE the browser sniffing is 
successfull. I guess my question really is.. is there another way to perform 
the browser sniffing bellow so that it works in Mozilla and IE?
(Reporter)

Comment 4

15 years ago
sorry I figured out that it should be as follows in the header:
<noscript>
   <meta content="0;url=#nojavascriptorjava" http-equiv="refresh">
</noscript>
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID

Comment 5

15 years ago
Marking Verified.

Nikolay: thank you for this report, but issues involving <meta> tags
have nothing to do with JavaScript Engine. See descriptions of components:
http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Status: RESOLVED → VERIFIED

Comment 6

7 years ago
Created attachment 562292 [details]
updated testcase pointing outside the document

On Firefox 9, the testcase works correctly for me. However, I get the following error in Error console. Is that expected?

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannel.responseStatus]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource:///modules/HUDService.jsm :: RL_onStartRequest :: line 395"  data: no]
Source File: resource:///modules/HUDService.jsm
Line: 395
Attachment #118767 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.