Hasan Zohdy
Hasan Zohdy

Reputation: 111

Speed Up website by reducing css files

I'm wondering about css files

let's say that we have about 8 css files

here is my question

is it better to put my css code in my html file to reduce css files requests

or putting all my 8 css files in one css file

Upvotes: 0

Views: 111

Answers (3)

uadmin
uadmin

Reputation: 1

I'm not a pro in WordPress, when I use SEO checker, my website https://nsplomodiern.lite-heberg.fr have 4 CSS files. I wanted to minify it to have only one file. Anybody have a step by step tutorial to help?

Thanks a lot! Seo css analytics results

Upvotes: 0

Klapsa2503
Klapsa2503

Reputation: 919

When it comes to CSS, multiple files will not slow down your website (in a way that you can notice a difference), but they can make your code much nicer and better organsized. In my opinion it is good to split your CSS files into two main categories:

  • main CSS file for website layout
  • secondary CSS files for some specific elements, rarerly used (e.g. spinner that appears only on home page)

This approach will also make it easier to reuse the code.

Upvotes: 1

Edward Manda
Edward Manda

Reputation: 579

Put them in one CSS file and minify the file. Computer technology is now so fast that the CSS request speed won't be affected that much. You will reap more benefits doing it that way than putting the CSS in your html

Upvotes: 2

Related Questions