Re:Mobile Website Speed Testing Tool
by BugsJustFindMe on Tuesday January 10, 2017 @07:04PM
(#13370533)
Counterpoint, there's no reason to uglify something simple and clean by copy-pasting CSS into it to just to shave the remaining hairs off the dog's balls* when we already have a nice interface for read-once-use-everywhere references.
* - I don't know if that's a real expression. It doesn't even seem to fit, but I like it so I'mma keep it.
If it's on http2 and/or preloaded that certainly isn't true.
That's certainly true, but to his point - it's an 8ms call - is it worth the number of points Google knocks off?
Re:Mobile Website Speed Testing Tool
by TheAceOfHearts on Tuesday January 10, 2017 @07:31PM
(#13370701)
What size cutoff would you use for the <style> tag? In other words, at what point is the tradeoff worth it?
I think its around 30kb.
https://www.smashingmagazine.com/2015/08/understanding-criti...
I do it for sizes less than 10KB (completely arbitrary) for most websites because the fact of the matter is that most websites don't get repeat visits often, and visitors rarely visit more than the page/article they arrived at.
There's no point making all visitors cache a CSS file when only a tiny minority will need it.
Note that I live in the middle of the Pacific Ocean, so HTTP round-trip times are terrible for most users. If you're on a first-world connection, it shouldn't matter as much.
It doesn't necessarily have to be about size. The goal is to let the browser paint the above-the-fold content without any external round-trips. Using the least possible seams sensible, especially if you do it on every page. This lets caching work as intended for the majority of the CSS.
Put it <style> tags in the <head>. No reason to use an external file for so little. It's not worth the overhead.