3 ms·
Or for people with bad connections. If you expect high latency it can be worth it to embed js code to avoid the additoinal roundtrip. 10kb makes a big differenc
by dx034 4y ago
Or for people with bad connections. If you expect high latency it can be worth it to embed js code to avoid the additoinal roundtrip. 10kb makes a big difference for that.
- wruza 4y agoWhich sites do that for any meaningful reason? I see this argument often, but have a hard time either coming up with an idea of a business for which it would be non-marginally profitable or finding a real app/site which does that to cover the last mile of its world-wide scale. Until that I believe this argument is equivalent to “what about Mars”. By supporting dead slow connections on Earth you simply support them to remain so.
- reflectiv 4y ago> Which sites do that for any meaningful reason? Literally none...this is just the argument of contrarians or people who've only ever worked on personal projects who take offense to real applications used by actual audiences.
- dx034 4y agoIn itself 10kb doesn’t make a difference. But it adds up so that this mindset can lead to noticeably faster pages.
- lelandfe 4y agoAs someone who has shipped thriftily-sized sites targeting developing countries, what you're describing is a needlessly extreme optimization. Inlining 3kb of data vs. 13kb would be a nearly unnoticeable difference for even the worst connections – like in Guinea, whose median download speed is around 3mbps. Inflating the document size does impact paint time, but it scarcely matters here.
- gaganyaan 4y agoI'm currently on a roaming cell phone connection where T-mobile has graciously given me 256 Kbps down. That actually would be a noticeable size difference. I don't have a deeper point, just thought it was funny that I would love a 3 Mbps connection right now.
- dx034 4y agoThere are a lot of places in Europe where you won’t get 3mbits with your phone.
- mekster 4y agoBad advice. You don't embed same piece of code on every page request but instead you make the code cached on first download.
- dx034 4y agoDepends on users and usage. If most visitors haven’t been to your site in a while and visit few pages it can be worth embedding.