Skip to content

Use replaceState for setting query params #266

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

Merged

Conversation

pete-murphy
Copy link
Contributor

@pete-murphy pete-murphy commented Feb 3, 2022

Description of the change

Fixes #61. This changes the setQueryParameters to use replaceState. setQueryParameters is only called on initial load via createSessionIdIfNecessary, so replacing the browser history state in this case seems like the right behavior (as opposed to pushState which would add an entry for the sessionId-less URL).


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0 by @)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

GIFs

Using replaceState (these changes)

Chrome 97.0.4692.99

Kapture 2022-02-03 at 07 48 17

Firefox Developer 97.0b7

Kapture 2022-02-03 at 07 46 54

@pete-murphy pete-murphy marked this pull request as ready for review February 3, 2022 13:11
@thomashoneyman thomashoneyman merged commit a989a85 into purescript:master Feb 3, 2022
@pete-murphy pete-murphy deleted the avoid-session-redirect branch February 4, 2022 04:15
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

Successfully merging this pull request may close these issues.

Use pushState instead of a session redirect
2 participants