4 ms·
I see the definition of SPA as a web app that doesn't require page reloading when navigating. So both a SPA an an MPA can have the same URL structure while the
by spurgu 5y ago
I see the definition of SPA as a web app that doesn't require page reloading when navigating. So both a SPA an an MPA can have the same URL structure while the latter requires page refreshes when switching between them. I might be wrong.
- denton-scratch 5y agoI see. I guess I'd better inform myself better about the jargon. So without a page-refresh, does anything get stored in browser history? Does the back-button work?
- spurgu 5y agoTraditionally that's been an issue but nowadays there's the History API. https://developer.mozilla.org/en-US/docs/Web/API/History https://developer.mozilla.org/en-US/docs/Web/API/History
- hbn 5y agoCorrect. What I was trying to get across in my earlier reply is that a URL isn't quite treated the same as their name would imply these days. I could see why that might annoy purists, but these days there are browser APIs that enable modifying URLs (which modifies the "back" history) through Javascript, without actually doing a full reload of resources. So even though you're requesting a different address, you're technically not getting an entirely new "resource." No matter where you hit the address, you'll get the same base blob of HTML/css/js, but going to the URL directly will fire the proper navigation (through js) to get you to the spot you requested (which may involve loading different resources, dynamically). Hopefully that explanation makes sense