Closed
Bug 146860
Opened 23 years ago
Closed 22 years ago
espn.go.com - solution (browser detection...)
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mjg8moz, Unassigned)
References
()
Details
(Whiteboard: [havefix][havecontact])
Not sure if this has already been figured out, but I think I've found the
difference between the pages that work at ESPN, and the pages that don't...
The pages that do work, and load everything correctly, have this browser
detection script...
---
<script type="text/javascript" language="javascript">
if (navigator.OS == 'mac') {
if(navigator.family == 'nn4') {
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/shell_macnn.css" title="master">');
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/generic_macnn.css" title="master">');
} else {
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/shell_macie.css" title="master">');
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/generic_macie.css" title="master">');
}
} else {
if(navigator.family == 'nn4') {
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/shell_nn.css" title="master">');
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/generic_nn.css" title="master">');
} else {
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/shell_ie.css" title="master">');
document.write('<link rel="stylesheet" type="text/css"
href="http://espn.go.com/insertfiles/css/generic_ie.css" title="master">');
}
}
</script>
---
An example of a page that works, and uses that script, is the main NHL page,
http://sports.espn.go.com/nhl/index
The above script seems to work to me because navigator.family seems to be
'undefined' in Mozilla and IE, which is why it correctly loads the IE style sheets.
The ones that don't work, have this script somewhere on the page...
---
var ie = "Microsoft Internet Explorer";
var nn = "Netscape";
var browser = navigator.appName;
var mac = "MacPPC";
var os = navigator.platform;
if(browser == nn) {
document.write('<link rel=stylesheet type=text/css title=master
href="http://espn.go.com/insertfiles/css/mlb/font_nn.css">');
} else {
document.write('<link rel=stylesheet type=text/css title=master
href="http://espn.go.com/insertfiles/css/mlb/font_ie.css">');
}
---
An example of a page that uses the incorrect script is the main MLB page,
http://sports.espn.go.com/mlb/index
navigator.appName shows up as 'Netscape' in Mozilla, which is what's causing
these pages to load incorrectly...it's loading the wrong style sheets. There
are a bunch of other pages that also use navigator.appName and check it against
'Netscape', in order to load different content.
Perhaps if that value was either changed (if possible) to something like
'NetscapeMozilla'...really, you could use anything but 'Netscape', that alone
may solve all (or at least most of) the problems at ESPN.
Reporter | ||
Comment 1•23 years ago
|
||
Not sure how you would fix this in Netscape 6.x, but I would assume the
navigator.appName field could also be changed to something like 'Netscape6+', in
order to distinguish it from older versions of Netscape.
Reporter | ||
Comment 2•23 years ago
|
||
In order to test this, if you copy the source code from the MLB page (which I
linked to) and save it locally, and then change the...
var nn = "Netscape";
line to read...
var nn = "Netscapexxxx";
or something other than Netscape, the page loads absolutely perfectly, no
imperfections in the rendering at all.
Reporter | ||
Comment 3•23 years ago
|
||
The MLB scoreboard, http://sports.espn.go.com/mlb/scoreboard uses yet a
different detection script, that does not work by simply changing
navigator.appName...
Comment 4•23 years ago
|
||
This bug is very much related to bug 122389.
Reporter | ||
Comment 6•23 years ago
|
||
I personally hate IE, but have no choice but to use it since Mozilla massacres
ESPN.com, and I'm on that site a ton...perhaps it would be a good idea to allow
the user to somehow change the value of navigator.appName
Comment 7•23 years ago
|
||
At http://espn.go.com/sitetools/s/espncsfaq.html#generaltech, neither Mozilla
nor Netscape 6 are in the acceptable browser list. The only method of feedback
I found is at http://espn.go.com/page2/s/feedback.html.
Severity: critical → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Possible ESPN.com solution (browser detection...) → espn.com - solution (browser detection...)
Whiteboard: [have fix][have contact]
Updated•23 years ago
|
Whiteboard: [have fix][have contact] → [have fix][havecontact]
Comment 8•23 years ago
|
||
*** Bug 156503 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Whiteboard: [have fix][havecontact] → [havefix][havecontact]
Updated•23 years ago
|
Summary: espn.com - solution (browser detection...) → espn.go.com - solution (browser detection...)
Comment 10•22 years ago
|
||
tech evang june 2003 reorg
Assignee: bc → english-us
QA Contact: zach → english-us
Comment 11•22 years ago
|
||
Has anyone actually contacted ESPN about this problem? This problem makes any
sports fan unlikely to use Mozilla since the web site is unusable... basic
things such as sports scores do not show up in the browser due to this problem
(e.g. check out page http://sports.espn.go.com/mlb/scoreboard
Comment 12•22 years ago
|
||
this page redirects back to the homepage which works for the most part. I have
reported a js error for flash1_DoFSCommand and the trailing nulls in their ad
script. marking fixed. I will work on the scoreboard in a separate bug.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•