Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Does using multiple CSS files (default.css, print.css, mobile.css...) affect a website's load time?

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

Yes. The more HTTP requests you make, the slower your site will load. That's why Yahoo's first recommendation in 'Best Practices for Speeding up Your Website' is to minimise HTTP requests by combining CSS files:

"Combined files are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all CSS into a single stylesheet. Combining files is more challenging when the scripts and stylesheets vary from page to page, but making this part of your release process improves response times."

share|improve this answer
add comment

Yes. Each one has an overhead of an http request. However, by the looks of it you're using different style sheets for different media types, so the browser should only use them if it needs them, providing you're defining them like this:

<link rel="stylesheet" type="text/css" href="core.css"
  media="screen" />
<link rel="stylesheet" type="text/css" href="print.css"
  media="print" />

For mobile you can be clever and use media queries according to the abilities of mobile devices: http://www.alistapart.com/articles/responsive-web-design/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.