Burn in hell IE!

I finished my site then was about to release it. That was till I noticed IE wants to load it in quirks instead of standards mode. WS3 validator passed it with flying colors. It comes out beautifully when I force it through developer tools. Is there anything I can do to force this joke of a browser into doing what it supposed to do? :smoke:


[COLOR="#FF0000"]HTML5[/COLOR]

<meta http-equiv="X-UA-Compatible" value="IE=9">
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

You need to have a proper doctype to stop IE going into quirks mode—that’s all. If this is an HTML5 site, then use this at the top of your page:


<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">

That is at the top. For some reason it is still loading in quirks. It is beyond irritating when you do not know what is causing the problem. @_@ Chrome does not have a problem with it. IE displays it correctly when I change it the mode. Firefox plus Opera did have an issue with the border outline. Nothing after I checked it again on W3C site.


<!DOCTYPE html>
<html>
	<head>
		<title>
			[(site_name)] - [*pagetitle*]
		</title>
		<meta http-equiv="X-UA-Compatible" value="IE=edge">
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta name="robots" content="noimageindex, nosnippet">
	<!--[if IE]>
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

You’re trying to use a specification not even out of draft, one that results in fat bloated code if you follow it’s new structural rules, rolls back the past DECADE of progress in terms of semantics and good coding practice… and then complaining it doesn’t work?

My advice, forget the HTML 5 BS, and the associated idiotic javascript shim that goes with it.

Of course, if we could see the whole site instead of just a snippet… we could probably dial in solutions better… Even so, HTML 5 exists only to sell more books, videos and to placated the people who up until two or three years ago were sleazing out HTML 3.2 and slapping a 4 tranny doctype on it… leaving them at the bleeding edge of 1998 coding techniques. It offers NO tangible benefits over 4 STRICT or XHTML 1.0 STRICT, and loosens up the structural and syntax rules to the point that validation is pointless!

It is such idiotic bull I can’t understand why ANYONE who actually cares about writing websites is wasting time on it!

But yeah, let’s blame IE for trying to use something that shouldn’t be real world deployable for another decade, and IMHO should be stamped out as nothing more than pointless bloat and “gee ain’t it neat” nonsense turning developing sites into a trip with Mr. Peabody to the WORST part of the browser wars.

Off Topic:

Come on, Jason, you know you miss the browser wars. Netscape rules, IE drools! And why doesn’t my site look good in UdiWWW?

Not quite … but I’m not sure if the differences are important or not, but [COLOR="#FF8C00"]<meta charset="utf-8">[/COLOR] goes with that doctype and should be straight after the <head> tag.

As long as there is a doctype, IE shouldn’t go into quirks mode, so either you need to tidy up the doctype or something else on the page is messing things up. IE doesn’t handle HTML5 without a lot of JS help, but the doctype itself shouldn’t be a problem. Also make sure there isn’t anything else on the page above the doctype.

Is there anything before <!DOCTYPE html>?
Such as a comment like this:

<!-- silly template information that doesn't belong here -->
<!DOCTYPE html>
<html>...

or an XML declaration like this:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html>...

Either will cause IE to render in quirks mode.

imaginekitty:

the XML prologue thingie is actually one thing that won’t send them into Quirks Mode: when IE7 came out, it was trained to look for that and ignore it if it was there. So with the XML prologue, IE6 would indeed still go into Quirks Mode, but IE7 wouldn’t.

But I noticed the OP is doing some force-the-browser-to-act-new chrome/edge thing. The point of that tag is, someone may be running a new and nice version of IE (say, 8 or 9) but have set it (even accidentally, or are viewing local files which for some reason do the same thing… this is online IE right?) to Compat Mode, IE7 mode, or something else retarded.

<meta http-equiv=“X-UA-Compatible” value=“IE=edge”>

Now, most of us who are already making our pages work well with IE6 or 7 and up don’t care: if the user wants to view our pages as if their IE was 7, fine. They just get the IE7 version, which, since we built for it, works anyway (might be a bit uglier, but whatever. Users who care will investigate and maybe discover what a browser is… most won’t).

But I’d remove that line first and see if you page changes. Though agreed with others that we’d be more likely to spot a problem somewhere if you posted either a link or the full code.
If you have sensitive information you can make a dummy copy (where all the text is blah blah) that still shows the problem.

Also, what’s telling you the page is in Quirks Mode? Could it just be IE in retard mode? It can do that without being in Quirks.

Nah, doesn’t matter.
When they were writing HTML5, they also needed to document browser parsers. Turned out, every parser was already dealing with people writing the meta charset tag all retarded anyway (mostly with <meta http-equiv=“Content-Type” content=“text/html;" charset="utf-8” > and similar) so it turned out the tag as <meta charset=“utf-8”> did exactly the same thing, and so why type more? So that’s why it’s in the HTML5 specs, but you could add it to HTML4 or XHTML and only get validator complaints. Browser would be fine.

As for position, that’s more for security and performance (both minor): there is a small, obscure hack called “the utf-7 hack” where anything between the opening head until the meta charset tag could possibly be open to interpretation as a “script” when played around with by script kiddies. This works because of the performance reason: before the browser gets to that line, while it may or may not have bothered reading the HTTP Header from the server (tho it should have), it still will make a guesstimate about what charset the document is until it gets that confirmation. When it sees that, it goes back to the top (the doctype) and starts reading again with certainty.

IE6 would actually use heuristics to determine the likely charset. It was most vulnerable to the hack for the same reason. My information may be outdated by now too: possibly newer browsers take the server at its word and ignore the meta, and only read it if there’s no header info in the first place (not uncommon).

So for those reasons, it’s “a good idea” to make the first tag after your opening <head> to be the meta charset tag.

That new to me. OK, so how about the comments before the doctype? I don’t understand why it’s used but I see it a lot. I’ve even seen:

<!-- force IE into quirks mode -->
<!doctype html>

:badpc:

I don’t know about IE8, but IE6 was definitely a stickler for “Doctype must start on char 1, line 1”. IE7 was specifically trained against the prologue, but I’ve also seen pages that somehow didn’t trigger quirks mode that had stuff before the doctype (like, giant ascii bears and stuff). But so far as I knew, other than the XML prologue, any content before the doctype would indeed send it into Quirks.

I’ll have to check that site with the bear again.
*edit it was this page. http://www.tartelin.com/index.php Do I mis-remember, or is this page in Quirks Mode? It should be.

@OP

Burn in hell IE!

hmmm, that’s a bit harsh :). If you’re using html5 which is not even close to being finalised as a standard yet and so browser support for it is patchy at best among the major borowsers, then you have only yourself to blame if your page doesn’t work in IE or any other browser.

Maybe it should be users using html5 way prematurely that should be burning in hell :smiley:

A lot of people are already using it bud. Not just freelancers. Developers have had problems with IE before html 5 ever came into the limelight. You are insulting yourself and not bothering me. :stuck_out_tongue: This was not a flame-bait. :wink:

No.

Developer tools (open IE then hit F12) said it was. It looks fine when I put it in standard mode. Other than a few spots, it was not designed for older browsers. My work does resemble a mix of old strict with new. I will see if I can put more data.

I have never been a fan of Javascript either. Script kiddies use it to do dirty [SUP]####[/SUP] to people.

Yes, I agree. The silly notion that somehow HTML5 harms the state of the internet is just mind-numbingly boring. Wide sweeping generalizations about the folks that employ HTML5 tells me that some place way too much importance on their skills.

That’s true but so what? Just because they’ve used html5 doesn’t mean they know what they are doing or understand the potentiial pitfalls of using it so far out from it being finalised. I can use a camera, but that doesn’t make me a professional photographer :lol:. I don’t have problems with IE, so instead of blaming the browser why don’t you post a link to your page, or the entire code and not just snippets and maybe some one can show you what you have done wrong.

Off Topic:

Just a reminder to keep it friendly around here, guys. This is a really interesting topic, with a lot of differing views on it—which all have their place—so just put your points of view as honestly and thoughtfully as you can, and we’ll all be the richer for it. :slight_smile:

“A lot of people are doing it” has never been an argument worth anything to me. HTML5 is an unfinished spec, and that’s a fact.

However I doubt the issue here is anything about HTML5 specifically. Frankly, if there is nothing triggering Quirks Mode and the developer tool claims the page is in Quirks Mode, without any further information I’m going to have to say I don’t believe the developer tool. The <!doctype html> starting at char 1, line 1 should keep (all except 5 and below) IE out of Quirks Mode. We don’t know if this page is being viewed locally. We don’t know if this page shows problems in copies of IE on other people’s machines. We don’t know how or if the issues exhibited by Firefox and Chrome are relevant. It could be as silly as trying to use the HTML5-approved wrap-an-inline-anchor-around-a-block-element-in-the-presence-of-other-block-siblings, a known IE bug that didn’t magically go away once HTML5 stated it was legal.

We have no further information, so the point is moot.

In other words, without seeing the page in question, we can’t possibly give a straight answer and are drawing possibly completely incorrect conclusions…

Because snippets are meaningless gibberish.

and it looks like the op might have got a solution on another site.

I got a report on a page I overlook at work about looking funny. It is valid code, and found it looked weird due to Quirks Mode via Dev Tools. Through testing I found it flipped either by some rendering bug, or the page the user might have came from made the browser go into Quirks. I haven’t ruled out something like our page was the 2+ tab they had open and through the previous tab, it had QM on.

and it looks like the op might have got a solution on another site.

Would be nice if the answer was posted here as well, for people coming across this thread with similar issues.

Another example.

I remember when we’d build some pages with some CSS3 stuff that looked pretty good in IE8, but IE7 couldn’t deal with most of those things. The boss knew some version of IE could show the “nicer” page, but was complaining that stuff didn’t look right. He had indeed IE8 on his machine, but he was looking at the site on the dev server, and something about viewing local or intranet pages made his IE8 automatically go into Compat mode (not Quirks Mode, but still unexpected, tho I found it was documented somewhere on MSDN).

Sometimes a problem is on the users’ end and there’s little you can do.