3 ms·
There's tradeoffs with anything. Sending HTML over the wire has benefits you're dismissing like faster response times since responses are cacheable. (The benefi
by graypegg 3y ago
There's tradeoffs with anything. Sending HTML over the wire has benefits you're dismissing like faster response times since responses are cacheable. (The benefit can easily exceed some microseconds, especially if we're measuring time-till-the-user-can-actually-do-something.)
SPAs also have tons of benefits. Local state is awesome for instant reactivity once the page is loaded. But you also introduced an API that you now need to maintain, that 9/10 times, will only ever be used on this SPA and no where else.
It's just acronyms, pick whatever works for you. There doesn't HAVE to be one "best practice" that covers all use cases.
- ColonelPhantom 3y agoHuh, why is being cacheable unique to HTML? What's stopping an SPA app from using a cached JSON response?