4 ms·
Zero JS makes sense in some cases but this seems more code golfing than a real product that users would love. I totally agree bloated SPAs are terrible and in
by pier25 3y ago
Zero JS makes sense in some cases but this seems more code golfing than a real product that users would love.
I totally agree bloated SPAs are terrible and in most cases an MPA is the best option. But a bit of JS is certainly fine when it makes for a better experience. Even HN uses a bit of JS.
And what's the point of having all this bandwidth and CPU power available if we're not going to use it? (even one tiny bit)
- thewakalix 3y ago> With our ‘zero JavaScript’ happy paths now covered, we can have a little more fun when JavaScript is available in the browser.
- gherkinnn 3y agoJS is available in the browser unless someone knowingly disables it. It is a standard.
- chrismorgan 3y agoJS will fail to execute a lot more often than most people realise, e.g. due to poor network conditions, particularly if hosted on a different origin (first-party JS is far more reliable, and inline JS the most reliable).
- pier25 3y ago> e.g. due to poor network conditions Do you have any metrics on this? Seems like an extremely rare edge case. Anecdotally, I haven't experienced it in years.
- o11c 3y agoThe (semi-old) UK stats said 1.1% failure rate, but somebody more recent said it had increased to 3%. That's a lot.
- gherkinnn 3y agoSomebody said is a bad source. 3% failure seems too high given nearly everything requires JS.
- thewakalix 3y ago"Everything requires this" does not mean "this is always available"!
- flagrant_taco 3y agoThere's a huge gap between some JS and Spas though. The question for me is always where data is rendered to markup, not whether it uses JS in the browser at all.
- pier25 3y ago> There's a huge gap between some JS and Spas though I tend to agree but it depends. I made a small SPA a coupe of years ago with Mithril and the whole thing is like 40kB gzipped (JS and CSS).
- flagrant_taco 3y agoFor me the difference isn't the amount of JS, it's what the JS is doing. A page that requests JSON and renders it to HTML in the frontend is fundamentally different from one that uses JS for basic interactivity. Both uses absolutely have their place and there are products that would be noticeably worse for the end user if all HTML was rendered on the server. I've just learned to have a high bar there, the complexity grows quickly making bugs more likely and debugging more difficult.
- masklinn 3y ago> And what's the point of having all this bandwidth and CPU power available if we're not going to use it? (even one tiny bit) It’s there when you need it? Using less bandwidth and cpu means using less battery.