My website is built on asp net core, with all pages displayed as partialviews to create a spa model without relying on angular or other frameworks. By switching partialviews, I can easily modify the page's url using
window.history.pushState ("object or string", "Title", "/ new url");
However, when navigating back in the browser, the url reverts to the previous one but the partialview remains unchanged. I am looking for a way to intercept this transition and trigger the desired presentation. Is there a solution for this issue?