3 ms·
No JS can actually increase roundtrips in some cases, and that's a problem if you're latency-bound and not necessarily speed-bound. Imagine a Reddit or HN styl
by miki123211 2y ago
No JS can actually increase roundtrips in some cases, and that's a problem if you're latency-bound and not necessarily speed-bound.
Imagine a Reddit or HN style UI with upvote and downvote buttons on each comment. If you have no JS, you have to reload the page every time one of the buttons is clicked. This takes a lot of time and a lot of packets.
If you have an offline-first SPA, you can queue the upvotes up and send them to the server when possible, with no impact on the UI. If you do this well, you can even make them survive prolonged internet dropouts (think being on a subway). Just save all incomplete voting actions to local storage, and then try re-submmitting them when you get internet access.