Skip to content Skip to sidebar Skip to footer

Modernizr, Html5shiv, Ie7.js, And Css3 Pie. Which To Use And When?

I'm just starting to use HTML5 and CSS3 in my documents. I understand the need for JavaScript to bring Internet Explorer up to speed with these new tags and styles, but I don't kn

Solution 1:

I've got extensive experience with all of these, having used them for a few years each.

Modernizr

Includes HTML5shiv functionality Also does a lot more – if you don't use the other features, then don't use it, it does slow down page loads, but is worth it if you need it!

HTML5shiv

Very small, just fixes html5 elements in IE, nothing else.

CSS3PIE

Lets you use border-radius, gradients and box shadow in older versions of IE. Also can allow PNGs in IE 6. Adds a noticeable delay to page load.

ie7.js (and ie9.js)

Gives you many CSS3 selectors, min and max width, multiple classes and fixed positioning. Also can have a png fix if you like. Doesn't seem to slow things down much.

Conclusion

My advice would fall into two categories:

If you are just using the new (is 2 years new on the internet?!) elements, and CSS3 selectors, then use ie9.js + the html5shiv. This is lightweight, and just lets you get on with things without having to remember that IE6 doesn't support anything.

If you are using a lot of CSS3 stuff, then CSS3PIE will sort out border-radius and box-shadow. The gradient support seems a little flaky, so I've always used a fallback image instead. Modernizr lets you easily deliver different properties to browsers with different support. I've mainly used this for determining whether a browser has CSS transitions and transforms, as they are useful for any image sliders or content carousels. It's worth using the customisation tool to only include the functionality that you want – the webforms stuff shows a textbox with 50 in it for a couple of milliseconds, so it's worth disabling if you don't want it.

Hope that's helpful!

Solution 2:

I would recommend you use only what you need. Build your app in a browser that supports the features you are using, and periodically test in other browsers that you support. If something isn't working correctly, find the appropriate fix, whether it be html5shiv, IE9.js, Modernizr, or CSS3 Pie. You are not going to use all of the new features in HTML5 and CSS3 all in one page, so you don't need to include every polyfill library in existence. Wait until you find problems with the features you're trying to use, then try and find the library necessary to do that.

Solution 3:

I've used mainly CSS3Pie...it works great. But this afternoon i tested it on my laptop with I.E8 and there was an problem with it...it was disabling some css lines...when i removed the css3pie code my site gained twice the speed...then i came accross the posts with people arguing about the css3 slowdown...So at the moment i'm busy to find another way for IE7 & IE8 to have border-radius and shades.

If you want to use it...please test alot as it is NON-official fixes

Post a Comment for "Modernizr, Html5shiv, Ie7.js, And Css3 Pie. Which To Use And When?"