Locale redirection doesn't work with back button #50
Labels
A-i18n
Area: internationalization
A-router
Area: router
C-bug
Category: bug
D-easy
Difficulty: easy
good first issue
Good for newcomers
P-high
Priority: high
S-in-development
Status: in development
Describe the bug
Right now, Perseus' locale detection system doesn't compensate for the fact that the user might press the back button in their browser after being redirected, in which case they'll be taken back to a completely blank page.
To Reproduce
Steps to reproduce the behavior:
locale
parameter to thedefine_app!
macro./
./
in a browser, observe the locale redirection.Expected behavior
The user's back button should skip the interim locale detection page, and not display a blank page.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
This is due to the use of
.set_href()
onwindow.location
, when we should be using.replace()
, which is documented on MDN here.The text was updated successfully, but these errors were encountered: