Good time of day. There is a rather important question. I am developing software on nodejs. This is some kind of framework on pure pure JS. The size of the framework has become huge, and the SCSS architecture has gained a huge scale. There is only one difficulty. In the configuration of the framework, you can customize various elements, specifically - by setting colors to them. And it turns out that a large css file is loaded via a link, and then the style tag with custom settings is inserted in the header. At some point it became easier for me to generate a style sheet through JS, given that I wrote a whole set of tools for creating a css block.

The question is: can I refuse the link tag and write everything in index.html? Very important moment of optimization and application load time.

  • Well, take and measure ... - Qwertiy

1 answer 1

One of the main advantages of linking the file of styles via link is that the browser will cache css files loaded in this way. Accordingly, if the file is large, as in your case, then it is more preferable to use this method.