Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kgarner

macrumors 68000
Jan 28, 2004
1,512
0
Utah
Safari's Web Inspector shows 3 errors on load, the big ones are a </HEAD> with no matching opening tag and an extra <BODY> tag. But there are a lot of scripts that are called that give no indication as to what they are doing. There is a chance that one of them is some kind of browser detect that doesn't know Safari exists.
 

BlakTornado

Guest
Apr 24, 2007
944
0
Washington, OH
Web designers don't take Safari into account when making webpages. Same with Opera and various others because they aren't mainstream browsers (in their opinions). Often, companies try to make sure sites work fine in Internet Explorer and forget about the rest.

This is possibly why it's not working.
 

Makosuke

macrumors 604
Aug 15, 2001
6,661
1,242
The Cool Part of CA, USA
That's sort of interesting; here's what it's choking on:
Code:
<STYLE ID="NOF_STYLE_SHEET">
<!--
DIV#LayoutLYR { position:absolute; top:0; left:0; z-index: 1; visibility:hidden; }

DIV#Banner5LYR { position:relative; visibility:inherit; top:0; left:0; width:413; height:96; z-index:1; }
-->
</STYLE>
Specifically, the visibility:hidden; in #LayoutLYR. If I'm reading it correctly, the stuff in there should be commented out, but Safari is definitely treating it as if it isn't. Uncomment it, and you get the same in any browser--a long page of nothing with a spacer image or something at the top.

Is there something wrong with that comment such that it's not technically valid and that's why Safari isn't treating it as a comment, or is this a Safari bug? Edge case, but if it's actually a bug, it should be reported.

Not familiar enough with the spec--if an HTML comment (<!-- -->) appears within a style declaration directly in the head of a document, does that mean that it should be ignored (in which case Safari is wrong), or does everything within that style declaration get treated as if it were CSS, and thus is only checked for CSS comments (/* */), in which case Safari's behavior is correct.

Or maybe the spec isn't specific, so either is acceptable.

[Edit: Just noticed that TextWrangler's syntax coloring agrees with Gecko--colors it as if it's commented out--while it correctly recognizes "commented" material within a <SCRIPT> tag as being "live".]
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
There is so many things wrong with that page I'm shocked any browser can display it. :eek: Makes me sick to my stomach.

I agree with Makosuke with is being the "commented" out styles. Safari is interpreting it correctly by not seeing as commented out as the CSS specification says [1] comments in the style tag is done with /* comments */. It's up to the browser to decide what to do with a <!-- comments --> style. Safari generally follows the standards better, including not trying to fix bad code so it displays. I like that about Safari personally.

1. http://www.w3.org/TR/REC-CSS1#comments
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.