Jump to content

Recommended Posts

Should I attach pagename.css for each page or should I include all css rules in one css file?

 

My logic is if you load the huge css file every time, the page will be slower, and if you split them by purpose (for each page or widget), you'll get a faster output. Is that true?

Link to comment
https://forums.phpfreaks.com/topic/265473-how-should-i-manage-my-css-files/
Share on other sites

Not true. If you set your server settings correctly, a vast majority of the users will cache a larger file. Plus, the fewer the HTTP requests, the better off you are.

 

I tend to break out my CSS files by what they contain - base style, colors, forms, widgets, etc. Then on production all of those files are combined and then minified. Then my server has expiration set to expire in 365 days, with gzip enabled. This makes loading the pages a lot faster (minus the first page load from a visitor.)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.