Css loading - which is faster

Hi,
so i have many stylesheets for my site but to keep things fast i use php to combine the files into 1 and server the correct headers and expiry.

My question though is that for some areas of the site certain stylesheets are not needed so i could put in the php a if/else to remove that part from the overall sheet.

I am assuming though that this would then either not load the correct stylesheet as it might have cached the first time without the additional sheet included or it would have to ask everytime for the stylesheet.

So basically is it better to load a big stylesheet once or smaller stylesheets each time?

thanks

One big stylesheet would reduce the number of requests so I’d go with that.

I’d imagine it is faster since otherwise you have to wait for http requests to go through to grab the stylesheets.

We are talking about milliseconds though.

1 Like

thanks, i guessed it probably would be but just wanted confirmation :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.