Skip to content

Comment on Front-End Walkthrough: Building a Single Page Application from Scratchparent

Comments

"Also there is no inherent speed boost from an SPA"

There is: superior caching & resource management. Even if your non-SPA perfectly caches resources (impossible with bundling), you are still wasting time on parsing/compiling/executing cached scripts on every page reload, which can take up to a few seconds on smartphones.

In theory yes, and if you only aim your site at flagship smart phone owners.

In my experience in Latin America with 50-150$ Android phones, very few developers/managers in the "western world" actually care about their SPAs performance and in about 9/10 cases the simple backend rendered sites provide a better experience for me.

edit: Of course there also plenty of devs that add a ton of inperformant js to their backend rendered sites, destroying the experience.

Don't know why this was downvoted, it is relevant. That's the main reason why hacks like PJAX/turbolinks were invented in the first place, not having to reparse the same JS and CSS for every page change has a noticeable impact in perceived performance.

A wonderful solution for this is the Turbolinks approach which is a part of the standard Rails stack.

The new page request takes place over Ajax, the server sends the whole page, and only the body gets replaced thus avoiding the need for loading common assets and initializing js.

I'm simplifying but hopefully you get the point.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.