3 ms·
While SPAs are somewhat inefficient, I'm convinced that the unnecessary bloat is mostly related to A) advertising and/or tracking B) improperly compressed or
by strken 6y ago
While SPAs are somewhat inefficient, I'm convinced that the unnecessary bloat is mostly related to
A) advertising and/or tracking
B) improperly compressed or sized assets
C) unnecessary embedded widgets like tweets or videos
D) insane things like embedding files into CSS using a data URI and therefore blocking rendering
E) nobody using prefetching properly
These are very loose figures for my computer and internet connection, but a small server-side rendered site is in the 10s of KB, and loads within 2 or 3 seconds. A small client-side rendered site is in the 100s of KB, maybe a little more or a little less, and takes 4 or 5 seconds. The sites that I really hate are in the 5 MB+ range and don't load for anywhere up to 10 or even 20 seconds, which goes above and beyond the bloat caused by client-side rendering.
- Aeolun 6y agoIf you have any reasonably sized app you very quickly run up to 100s of KBs. Hell, just including moment.js to deal with timezones gets you there.
- strken 6y agoYep, but that only takes you into the range of 100s of KBs. To get above 1 MB is possible, but at some point before you hit a 5 MB initial page load it becomes the fault of things other than the technology you're using. EDIT: For reference, https://www.tmz.com/ https://www.tmz.com/ with no ad blocker is 19.22 MB (7.51 compressed) and takes 19.99 seconds to load, and they only use jQuery. I don't think the underlying technology is the problem for them.
- account42 6y agoF) dynamically generating layout on the client when it could just be generated once on the server and cached for 99.999% of all websites
- hombre_fatal 6y agoOn the other hand, round-tripping to the server on every interaction isn't the paragon of efficiency either. There are only trade-offs, not a faction war. People who don't realize that are usually just part of a cargo cult.