by JohnMH · 10y ago · 0 comments
In think it makes perfect sense that apps like Slack, New Relic, etc. are SPAs. But in news/blog type sites for example, it often leads to worse user experience in my opinion. A lot of traffic (and for some sites probably the majority) is external, directly pointing to an article.
In that case, I rather have a full page reload when i happen to click on a related article after reading than watching a spinner for second(s) every time I land on their page somehow.
If so: then does it make sense to download megabytes of JS libraries in order to save downloading 100kB of text?
To put it in concrete terms, I came to the conclusion that SPAs (or at least using javascript to implement most behaviors on individual pages of a multi-page application) make a ton of sense after spending a few years building an internal line-of-business application with a lot of behavior and not much content as a normal Rails multi-page app, noticing that the user experience was not great at all, and finding it to have very low return on investment to attempt to do it with progressive enhancement. We would have saved a lot of time and money by starting with a JS-based SPA approach for an application like that. If I were building a blog or news site, I suspect the opposite would be true.
That's why I comment in a new tab.
But yes, I see that as an example where JavaScript could improve an HTML page — but that's no reason to make it impossible to use with JavaScript!
That being said, you do have to be careful or your site may break for people utilising accessibility technologies such as a screen reader.