Multiple link rel

Hi all, in terms of loading speed, will multiple link rels make it slower, so i shld compile everything into a single .css file?

If you mean multiple css files for a single page vs one css file with everything in there, the later is faster. However sometimes it is convenient to keep the menu styles in a separate file, especially if you are re-styling it, as you can easily copy and paste over all the styles without fear of missing one. If I’m doing the admin side of an online database, I tend to put all the styles for the back-end in a separate css file, to keep the front end css file a bit smaller (and I often add db to all those style names, so a front end developer will not use a name that clashes with my styles, especially if they decide to copy all the back end styles into their css file eg #dbWrapper, #dbForm, #dbMenu, etc).

It depends on why you are looking to have separate CSS files.

If most pages on your site will need largely the same CSS, it’s better to keep it all in one file, because you want to minimise the number of HTTP requests made. The total file size downloaded won’t change much, but extra ‘handshakes’ will increase the download time.

If you have large chunks of CSS that are only used by a few pages and not others, it might well be sensible to split them into ‘common’ and ‘section-specific’ files - although you’ll then have an extra HTTP request being made, that will probably be outweighed by the saving you make by not downloading the CSS for other pages that you might not even look at.

heys thx all for the replies

Also if you have more than one without specifying the extras as alternates then it makes stylesheet switching harder.