Hacker News new | ask | show | jobs
by zoj_bad 4573 days ago
We don't exactly inline the CSS. (Actually, to be perfectly honest, sometimes we do when that seems like the more efficient thing to do and there is no benefit of modularity to be got from CSS.) However, in general we actually construct the HEAD and CSS also through the server library using some logic and parameters.

Now, you are right, this means that from page to page, those 3-4 bytes might be the same and re-downloaded. However, we are focused on mobile phones and some of our user base is on crappy mobile phone browsers (Nokia phones that are still popular here) that have a bad caching system. So the trade off is between 3-4 bytes of CSS that is a repeat, versus a whole new request. And 3-4 bytes of CSS is not even noticeable. A request most defiantly is.

1 comments

How much CSS can you fit into 4 bytes?

  a {}
Only if it's not gzipped :P That would bulk it up to more like 25 bytes.
Maybe they meant kbytes?
Lol. Sorry KB! My bad!