Management Matt Posted June 27, 2023 Management Posted June 27, 2023 6 hours ago, Dll said: Because downloading it all is still going to block something else from loading. So by moving all the CSS to be pre-loaded, it's actually going to block things that should and would have downloaded first. Browsers are actually quite good at prioritising these days, so you can do more harm than good by messing with the order and preloading potentially large files that don't actually need to be pre-loaded. In an ideal world the key CSS (eg the CSS needed to render the visible part of the page) would be pre-loaded or hard coded into the html. Just not all of it. This is how we see it too. Preloading everything may trick google but it makes it harder for your browser to figure out loading order. SeNioR-, G17 Media and Dll 3
Adlago Posted June 28, 2023 Author Posted June 28, 2023 22 hours ago, Matt said: This is how we see it too. Preloading everything may trick google but it makes it harder for your browser to figure out loading order. This sounds quite curious... Method above I described, I use for more than 2 years - not a single browser gets angry or does something illogical, for all app in the suite. Please give me an example of what you are talking about... H5K 1
ptprog Posted June 29, 2023 Posted June 29, 2023 In my setup, the CSS resources referenced in the head are loaded in parallel with a CSS that is preloaded (editor.css), so my expectation was for the preload to not have impact. In a quick experiment, I did not see any difference in how the CSS was loaded (CSS is queued and starts a few ms after the editor.css, which is preloaded, regardless of whether all the CSS uses preload). Based on my understanding of the preload, I would not expect it to harm performance, but I also do not expect it to help. The idea of the preload is to load in advance resources that the browser would not be aware of otherwise (e.g. resources that are not referenced in the HTML directly from the beginning, like it seems to be the case of the editor.css or the fontawesome). But for the "normal" CSS, the browser will see that the resources need to be loaded at the same time without the preload. Matt 1
Recommended Posts