I have this question. Unfortunately, there is no mentor and I do not know where to get this knowledge.

Suppose I make a website in several pages. On the main one, some styles, on the contact page, other styles, on the third page, third styles (of course there are common styles, I connect them separately).

First, does it make sense to include separate style files on each page? In theory, this can be optimized, but on the other hand, if a person switches from the main page and then to another page, then the styles are already in the hash and you do not need to load them for a new page. How does it make sense to do? Prompt can any articles, or life experience.

Secondly: if you still upload your own stylesheets for each page, then how to implement this function on Wordpress? Thank!

  • one
    This can be done, but the meaning is about zero. Style files in 10 thousand lines are loaded instantly, caching on the server and in browsers allows you to simply forget about this saving on matches. - KAGG Design
  • one
    Here's an example: a small site, almost without caching. Loading 1.3 seconds by PageSpeed. The total number of css lines in the core + theme + plugins is 107 thousand. Now count the number of lines saved by you, divide by 107 thousand and see how many milliseconds you saved. And compare with the number of hours spent on optimization. - KAGG Design
  • Fine! Thank! Just the practical advice that I needed! You can make this answer, I will note. Thank! - Igor

1 answer 1

This can be done, but the meaning is about zero. Style files in 10 thousand lines are loaded instantly, caching on the server and in browsers allows you to simply forget about this saving on matches.

Here's an example: a small site, almost without caching. Loading 1.3 seconds by Pingdom. The total number of css lines in the core + theme + plugins is 107 thousand. Now count the number of lines saved by you, divide by 107 thousand and see how many milliseconds you saved. Compare with the number of hours spent on optimization.