> then things like the back button after scrolling through the blog would work.
What do you mean?
> Why try to outsmart the browser?
Not sure how this is outsmarting the browser.
> then things like the back button after scrolling through the blog would work.
What do you mean?
> Why try to outsmart the browser?
Not sure how this is outsmarting the browser.
Regarding the back button, you can see the mis-behavior here: 1) Go here: https://zeit.co/blog 2) Scroll all the way down to the bottom 3) Click a link 4) Click back
Expected: Page returns to exactly were you left off Actual: You are scrolled to a random blog post
My overarching question is why any type of SPA is needed for a site like zeit.co?
Breaking the behavior of my back button is one of the worst user experiences I get these days. Usually it makes me so angry that I just leave the site right away.
> Rather than waiting for the HTML to be downloaded when a link is clicked, most of the UI can be displayed while a smaller payload is downloaded.
Browsers can do that on their own since forever, given a carefully crafted HTML page. Of course there are use cases where that is not enough, needing some load-on-scroll mechanism or something like that, but it gets abused all the time for things a browser could handle so much better (with proper HTM of course) - blobs, newspaper articles etc.
Obviously that is not the wanted user experience. Disregarding SPAs as a solution because of an unintended behaviour is kind of throwing the baby out with the bath water.
> Browsers can do that on their own since forever, given a carefully crafted HTML page.
How are you rendering parts of something from a server before receiving anything from the server using only HTML? I'm talking about the following flow:
1. User clicks link
2. Instantly the layout etc. is rendering using JS, with fancy loading elements (maybe ala how FB does their news feed) for the missing items
3. The data is loaded and put into the layout
Whereas for the non-SPA flow the user would have to wait for data to be received before anything is rendered. Of course pre-fetching alleviates this a bit, but it still requires the whole page to re-render.