Open ChrisBAshton opened 2 years ago
I see this was reported a while ago but it's still the case and it's still very annoying when trying to debug something.
Investigating this with the following journey:
On Chrome, the page that you end up on is the GOV.UK homepage and not Benefits (which is what would be expected). In Firefox this issue does not occur, it will go back to Benefits. When running this with Developer Mode turned on in Chrome extensions, I see the following console output:
Navigation to https://www.gov.uk/ was restored from back/forward cache (see https://web.dev/bfcache/)
The history (when right clicking the background) appears to be correct. Benefits appears in the dropdown and can be navigated to. When pressing back however, we get on the homepage.
When using the extension links such as
Production
,Staging
andIntegration
, the URL changes as expected. However, pressing the Back button does not take you back to the previous page.We should look into using the History API to push the change to the history array, to fix the back button behaviour.