4 ms·
If you have a blog that lives at `/` for example and posts that live at `/post/:num` for example, your SPA will have a href="/post/5" or whatever link, and then
by why_only_15 7y ago
If you have a blog that lives at `/` for example and posts that live at `/post/:num` for example, your SPA will have a href="/post/5" or whatever link, and then when you navigate there the SPA will get that blog's content from the server and be rendered there. I agree though that if you have comment functionality for example that would probably be made through an AJAX request in Javascript and it probably wouldn't be possible to automatically switch that to a form.
- quelltext 7y ago> A single-page application (SPA) is a web application or web site that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server. I guess the definition of an SPA is not as strict as Wikipedia says? But what makes such a web app (like you mention with actual page navigation) an SPA? That's just a ... normal web app/site. I guess the point was that a perfect SPA has a fallback mode that works without JS? I'm just not sure that exists at the moment. If you invest in an SPA and its (perceived) advantages aren't you choosing it precisely because you want it to be more than a traditional web app with individual pages? Hence all the JS and reactiveness in the browser. Building a degraded fallback mode would be admirable but it's a whole lot of added complexity (have to find alternative UX to accomplish those JS interactive pieces). If your SPA isn't actually an SPA maybe just stick with a traditional setup. That's why I don't understand the drift in that original comment.