Page URL Not Updating Correctly

0
Hi everyone,   While I was making my web app I noticed an issue where my page url would get stuck on the first page I enter and never change after.   For example:   MyWebsite.com/Documentation   So the flow goes like this, I login> /home > Click on Documentation page > /Documentation but when I go back to home OR ANY other page the URL is still /documentation. And sometimes, depending on the scenario whenever I refresh it returns me to the documentation page. This is not specific to the documentation page it's the first page I navigate to after logging in.   I'm quite new, is this caused by the fact that Mendix is an SPA ?   Thank you in advance !
asked
1 answers
1

This is expected behavior and is explained in the Mendix documentation.

 

According to the docs, the browser URL is only updated for pages that have a Page URL configured. When you navigate to a page without a URL, Mendix keeps showing the last visited URL in the address bar. That’s why it looks like the URL is “stuck” on the first page you open after login.

 

Because of this, Mendix does not automatically clear or reset the URL when navigating to other pages. If you want the URL to always reflect the current page (and avoid refresh returning you to the previous page), the recommended approach is to define a Page URL for every page that users can navigate to.

 

This behavior is by design in Mendix SPA routing and not a bug.

answered