re: Some questions about SPA UX VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thank you, thank you for your thoughts. This is really reassuring: The promise of SPAs is that by only loading data, you avoid the extra time tha...

That's just the way dev.to is built. Nothing would prevent a SPA from requesting the data again when going back to the previous page.

In fact, requesting the data again would be the default behaviour, if you want to cache your pages like dev.to does, you need to specifically build it. Otherwise, the app doesn't care how it got to the current page, whether the user loaded the page there through a bookmark, a link within the app, the back button... It just requests the relevant data and renders the page.

Also, I think that the dev.to behaviour is not specific to the back button, I've noticed that articles and pages I've visited recently aren't updated when I visit them again, so I doubt that the caching is specific to the back button.

In fact, requesting the data again would be the default behaviour, if you want to cache your pages like dev.to does, you need to specifically build it.

Honestly, what a relief. I avoided building SPAs for the last few months because I thought something was wrong with my approach. 😅 Thanks a lot, good (sir? madam?)!

code of conduct - report abuse