Answer the question
In order to leave comments, you need to log in
How to properly create critical css?
Hello.
I read articles about the implementation of critical css, but for some reason they do not understand important questions:
1) For what height of the display should critical css be created? After all, someone comes from a laptop with HD resolution, while the other has a 4k monitor turned vertically. Where is the golden mean?
2) What to do when the user gets to the middle, the footer of the site by anchoring? After all, in this case, after optimization, we get a fast-loading site header, and the lack of design on the rest of the page for a while.
3) Preloaders and critical css can't exist together?
Answer the question
In order to leave comments, you need to log in
it takes, as a rule, fractions of a second to load styles. therefore, critical styles are rarely bothered at all.
what to take out in critical css is always according to the situation, but IMHO the main principle should not be that we first completely render the first screen, and then everything else.
and that in that short time interval, while the styles are being loaded, the “bare” text in a column does not flash.
those. we hide secondary and auxiliary elements, put aside for later shadow-gradients with other prettiness, etc. the main thing is to display the layout so that the content does not jump when fully loaded.
3. Preloaders and critical css can't exist together?
Where is the golden mean?
laptop with HD resolution, and the other has a 4k monitor rotated vertically.
Preloaders
1. make a cut for your audience. Maybe they only watch you from smart TV.
2. try Splash screen. For the second page, it will not be needed - because. styles already in cache
3. see point 2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question