Performance, serve all CSS at once, or as its needed?

Posted by yaya3 on Stack Overflow See other posts from Stack Overflow or by yaya3
Published on 2010-05-19T23:21:23Z Indexed on 2010/05/19 23:40 UTC
Read the original article Hit count: 242

As far as I know, these days there are two main techniques used for including CSS in a website.

A) Provide all the CSS used by the website in one (compressed) file B) Provide the CSS for required by the elements on the page that is currently being viewed only

Positives for A: The entire CSS used on the site is cached on first visit via 1 http request
Negatives for A: if it's a big file, it will take a long time to load initially

Positives for B: Faster initial load time
Negatives for B: More HTTP requests, more files to cache

Is there anything (fundamental) that I am missing here?

© Stack Overflow or respective owner

Related posts about css

Related posts about httpwebrequest