I read Googles Optimize CSS Delivery article but I still don't know how much I can put in an inline style block. Google recommends using inline css when the content is small and for big files they suggest linking to a css file.

When I have css with about 250 lines, is it appropriate for inline css or should I link to it?


There is no definitive size where it becomes necessary or ideal to use an external stylesheet. Size is one factor but there are others which come into play. For example, an external stylesheet can be cached by the browser. So if your visitors will be making multiple page requests that use the same stylesheet, the browser can cache that stylesheet which will give the user faster page loads and a better experience. It also saves your server load and bandwidth.

Conversely, if this is a one page website then having the browser have to make multiple requests for assets can slow down the page load and harm the user experience (although it would be minimal).

So this decision depends on what you're doing and how you're doing it.

  • Thank you for mentioning that they get cached when I link to them, totally forgot about it – Luca Steeb Jan 10 '15 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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