Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Wednesday, June 3, 2009

@import is evil [CSS]

Steve Souders analyses how browsers treat @import compared to the more comment <link> method of including style sheets.
In Chapter 5 of High Performance Web Sites, I briefly mention that @import has a negative impact on web page performance. I dug into this deeper for my talk at Web 2.0 Expo, creating several test pages and HTTP waterfall charts, all shown below. The bottomline is: use LINK instead of @import if you want stylesheets to download in parallel resulting in a faster page.
Personally, I've always disliked @import, so I'm happy to have some solid metrics proving that using it is a bad idea.

Read the full article at www.stevesouders.com/blog/2009/04/09/dont-use-import/.