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

x/pkgsite: change browser URL to canonical path #40936

Open
julieqiu opened this issue Aug 20, 2020 · 0 comments
Open

x/pkgsite: change browser URL to canonical path #40936

julieqiu opened this issue Aug 20, 2020 · 0 comments
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@julieqiu
Copy link
Member

If the URL passed to the frontend is path@version.

it resolves this internally to module@version/suffix.

and all the links it puts on the page have this form. However, the
browser URL still says "path@version".

We could use window.history.replaceState to change the browser URL without a page reload. According to
https://computerrock.com/blog/html5-changing-the-browser-url-without-refreshing-page, it is available in modern browsers.

/cc @jba @jamalc

@gopherbot gopherbot added this to the Unreleased milestone Aug 20, 2020
@julieqiu julieqiu added pkgsite NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 20, 2020
@julieqiu julieqiu removed the website label Sep 19, 2020
@julieqiu julieqiu removed the website label Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

2 participants