Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page reload on redirect page("./pageToRedirect") #576

Open
micabal opened this issue Oct 6, 2020 · 1 comment
Open

Page reload on redirect page("./pageToRedirect") #576

micabal opened this issue Oct 6, 2020 · 1 comment

Comments

@micabal
Copy link

micabal commented Oct 6, 2020

Would it be possible to parse the path and remove the leading dot in the url if any ?
Indeed, having a leading dot cause the page to reload. I have seen some people having the same issue.

page("./pageToRedirect") redirects with a page reload.

page("/pageToRedirect") works as expected

page.js/page.js

Line 1005 in 4f99916

function page(path, fn) {

@micabal
Copy link
Author

micabal commented Aug 24, 2022

In fact I realized that the unexpected behavior may be expected sometimes.

page("./pageToRedirect") redirects with a page reload => should be kept!

For example, when "login out" a user, it may be required to reload all resources. In my case, page.redirect("./") was perfect because it did not keep the "/logout" page in history and still reloaded resources.

The leading dot behavior should be kept but detailed in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant