Hacker News new | ask | show | jobs
by guywithahat 485 days ago
Unrelated but I like the website, he minimized the css and placed it right in <style> tags. Presumably the idea was to have such minimal styling you don't need to load a second file. Clever
1 comments

I appreciate their minimalism too, but with http2 and http3 isn't this an anti-pattern? The overhead of loading an additional file is negligible in http2/3, but inlining causes you to have to re-download the CSS on every page instead of benefiting from the browser's cache.
No because that additional CSS file can only be fetched after the initial HTML file has been fetched, not simultaneously; thus requiring another roundtrip to the server. (HTTP/2 Server Push promised otherwise but it was never implemented correctly.)

Latency being much more constraining than bandwidth, embedding a stylesheet that’s small is nearly always the correct tradeoff.