Browser Back Button Redirect Bug

29 Views Asked by At

When transitioning from page A to page B, the user refreshes the page and then clicks the back button. Instead of redirecting the user to page A, they are redirected to the browser's home page. This issue occurs only in Chrome and Edge; Safari and Firefox behave as expected. This problem occurs only when the user refreshes the page. The application is written in React 16.8.6, and the routing is handled by the react-router library version 3.2.1.

The path to the previous page remains the same before and after page refresh. The state of the history object persists before and after page refresh.

0

There are 0 best solutions below