3 ms·
It's not that the CSS is linked at the end of the document but that the CSS is only loaded by Javascript after the document has finished loading. That's ... un
by bhaak 8y ago
It's not that the CSS is linked at the end of the document but that the CSS is only loaded by Javascript after the document has finished loading.
That's ... unusual to say the least and if I'm honest, the wording "most stupid, brain dead thing I've seen in a long time" was the first thing that crossed my mind.
- _Zoran_ 8y agoI can't remember what the logic for that was. I think I was messing around trying to see if I could appease google pagescore on such a tiny page, and eventually I just gave up and left as it was.
- bhaak 8y agoOh, I see now where this is from: https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery https://developers.google.com/speed/docs/insights/OptimizeCS... That's quite an ugly optimization step. You left out the step where you inline the necessary CSS styles in the head that's why the unstyled page flashes up for a second. But as you use bootstrap, this might be a lot to inline and not worth the effort. I'd say this is a case where you shouldn't care too much about a highscore :-)
- _Zoran_ 8y agoYeah, I tried inlining it, and it turned out it was going to be a massive amount of CSS :) Maybe I'll just bite the bullet and do my own CSS.