Twitter Bootstrap : Html5 shim for IE6-8 : off by default - WHY?

The Twitter Bootstrap example/starter webpages do not have the HTML5 shim activated to allow support of IE6-8. Why not?

Does the shim cause problems in other browsers? Or with Bootstrap? Or with it’s Responsive features?

We would like to support IE6-8 because many of our customers are elderly and are still using their old “tried & true” computers :rolleyes:

The default un-activated code in the Head looks like this:
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements –>
<!–[if lt IE 9]>
<script src=“http://html5shim.googlecode.com/svn/trunk/html5.js”></script>
<![endif]–>

So to activate it, do we just remove the commenting like below? Or is some other action also needed?
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements –>
[if lt IE 9]
<script src=“http://html5shim.googlecode.com/svn/trunk/html5.js”></script>
[endif]

Thanks!

Greg

Hi Greg Baka. Welcome to the forums. :slight_smile:

No, those aren’t deactivated. Those are called IE conditional comments, which are designed that only IE will read them. They are ready to go as is, so you don’t need to modify them at all. If fact, you will disable them by removing the apparent comment characters.

Not at all, they will still be enabled, but they will also be enabled for browsers which don’t need them to function properly. It doesn’t hurt to run the shim in browsers that don’t need it AFAIK, but it’s a waste of resources to run it since it doesn’t add anything at all [for those browsers].

Thank you both for the fast replies!

Using the fact that only IE6-8 will read that command and that all other browsers will think of it as a Comment is great trick.

The folks at Twitter Bootstrap should probably add to their comment on that command so that others don’t try to second guess them and remove the <!-- parts.

Yes, sorry, I meant disable them as comments for IE only. It was late. :slight_smile: