The actual difference between styesheet in the header and a seperate file

Posted by David Knight on Pro Webmasters See other posts from Pro Webmasters or by David Knight
Published on 2013-09-20T19:21:35Z Indexed on 2013/10/20 10:18 UTC
Read the original article Hit count: 274

Filed under:
|
|

Am wondering if someone can give me an opinion on this.

I have always been taught to have all of the CSS in a separate file that is referenced from the head of the page. Reading this article http://www.lukew.com/ff/entry.asp?1792 the author is talking about making the Guardian website responsive. One of the things he notes they did to make the site faster and more resilient is to add the CSS inline into the header, thus reducing HTTP requests.

Now this got me thinking about the right/best/fastest way of using the CSS

If you have one main CSS file, its going to be called and read by the site on every page, no mater how big it is. So with that in mind, Im actually starting to think its better to just inline the whole style sheet and remove one HTTP roundtrip.

I know for the purposes of neatness and being able to edit the file a seperate file is better.

But which would you recommend and which do you think is faster?

Thanks!

© Pro Webmasters or respective owner

Related posts about html

Related posts about css