14 comments

[ 2.9 ms ] story [ 46.6 ms ] thread
>If you're specifying X-UA-Compatible and the value is just "IE=edge", that's unnecessary. Remove it.

Unless your IT department has deployed IE7 emulation mode via GPO for SharePoint. Then you need it to make sure your page doesn't explode

When I was writing about this, I didn't think the intranet case was so common. I may have underestimated that.

EDIT: Updated the article to mention intranets.

>If you're specifying X-UA-Compatible and the value is just "IE=edge", that's unnecessary. Remove it.

No.

Man, this bit has gotten me flak everywhere. Here's what I think.

99.5% of websites that use this tag - it does nothing. Internet Explorer users don't set their own Compatibility View settings, so we can ignore that. Second, if you're cool enough to be on Microsoft's Compatibility View list, you're cool enough to know that you need an X-UA-Compatible tag and you know what it should be set to.

The problem I have is people blindly copy-pasting this value from whatever HTML5 boilerplate they got it from. I'm going to rephrase this section of the post to make my point more clear.

EDIT: Toned down my phrasing in the article to be more specific about when you can safely remove X-UA-Compatible tags. Yes, there's an argument that it doesn't cost you anything to keep it in there, but there's also arguments for ultra-short head tags (<4 KB) related to TCP windows, which I'll get into in another post.

Been a while since i browsed HN, anyway.

It's good that you updated it, because I've had SO MANY issues with this with clients in the Dutch oil & gas industry, users working on IE and having their mode set to IE 7 to work with some rediculously ancient application. Adding the tag can save you a lot of time.

> Concatenate all of your site's stylesheets and scripts into one file each.

You can use something like Google Tag Manager to bundle scripts together. It is not suitable for every case, however, such as tags that need to be loaded synchronously (I believe).

i hate, hate, hate, hate google tag manager

show me a google analytics setup with seriously screwed numbers, and i show you a site which loads GA via google tag manager..

people tend to think that they can bundle all the third party crap into their webpages with google tag manager and that there would not be any costs (to the project, to the user). this is wrong, google tag manager adds a whole new level of abstractions and issues.

my tip: reduce third party crap that you don't need. implement them async into your code. regularly remove crap that you don't use.

That's too bad. I really like the concept of Google Tag Manager.

Are there are any "tag bundlers" that work? It seems like such a great idea.

Interesting reading, but this threw me a little:

>meta tag This is probably the most common option. [...] If you do this, it's important that it's the very first element in the head.

...and a bit later on:

>If you're going to specify a viewport size, do it at the very top of the head.

@nateberkopec and other people much smarter than I: which is it?

Edit x2: clarity.

Character encoding, then viewport tag.

Really, the viewport tag just needs to be before any CSS - external or inlined.

>> TCP isn't really designed for short bursts.

Isn't that what connection keep-alive is for?

Absolutely, that helps. But that doesn't help you if your page needs to make requests across 20 different domains.
Oh, yeah. This is why I don't use CDNs.