Modern websites don't reload every page anymore.
So how does the browser change pages without asking the server for a new HTML document?
The answer is the History API.
The History API lets JavaScript change the current URL without triggering a full page refresh.
Frameworks like React Router and Next.js use:
history.pushState(...)
instead of:
window.location = "/dashboard";
The browser updates the address bar. The existing JavaScript application stays alive. Only the required UI changes.
This is why navigation inside a React application feels instant. The browser isn't downloading another website.
It's displaying a different view inside the one that's already running.
