chrome browser back arrow redirection issue in Single page application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @Amit Dey ,
Use sysparm_nostack=true to Prevent Navigation Stack Entries in Classic UI. If your SPA includes UI pages embedded via UI macros (e.g., within iframes or similar), ServiceNow navigation stack can disrupt back navigation....
Workaround would be, append the URL parameter sysparm_nostack=true to the UI page URL. This prevents the page from being added to the navigation stack, avoiding strange back-button behavior.
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
We’ve developed our application entirely using widgets. On page load, the application checks the hash in the URL and loads the corresponding widget based on it. Similarly, when a user clicks on a link, the hash in the URL is updated, and the relevant widget is loaded accordingly.
All the logic that determines which widget to load based on the hash is handled in a separate widget.
The issue we’re facing is that when the user navigates using the browser's back or forward buttons, the URL hash updates as expected, but the corresponding widget does not get loaded. However, if we manually refresh the page, the correct widget loads based on the updated hash.
What would be the proper way to ensure that the widget updates correctly when the hash changes due to browser navigation?