J
J
Javarast Skriptovich2018-12-16 16:09:22
css
Javarast Skriptovich, 2018-12-16 16:09:22

Does it make sense to inline CSS directly into HTML?

(during the final assembly, and not in the development process)
Actually, the whole question)
This will reduce the number of requests per page by half, but what are the pluses and minuses?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
Zhandos M, 2018-12-19
@M4mkin_pr0ger

It makes sense to inline the critical css to display the first screen (top of the site) to the user. This technique is also an official recommendation https://developers.google.com/speed/pagespeed/insights/ .
The main css should be loaded asynchronously, for example, using the https://github.com/filamentgroup/loadCSS library

S
sim3x, 2018-12-16
@sim3x

It is used to speed up the display of the first screen to the user with a gigantic size of the main css
It is not done by hand It has nothing to do with
search engine optimization or goes negative
It has nothing to do with server optimization

C
coderxx, 2018-12-16
@coderxx

It is categorically contraindicated as it puts an end to further support.
And how will this reduce the number of requests per page, due to what?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question