Skip to content

fix(rum-legacy): reload the verification page by its own url - #38

Merged
Fiona2016 merged 1 commit into
publishfrom
fix/verification-page-self-reload
Sep 1, 2026
Merged

fix(rum-legacy): reload the verification page by its own url#38
Fiona2016 merged 1 commit into
publishfrom
fix/verification-page-self-reload

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

The Check page exit button navigated to a literal index.html:

window.location.href = 'index.html?after-exit=1'

That holds only while the file keeps its name. The page is meant to be run inside the environment being verified, so it gets copied out of this repo and served from another host — where it is usually renamed, precisely to avoid colliding with that site's own index. The button then navigates to a url that does not exist.

The failure mode is the bad part: nothing is logged and no error is shown, the page just stops loading. On the browsers this page exists to test, there is frequently no usable devtools to find out why.

The fix

Reload the url the page was actually opened at:

window.location.href = window.location.href.split('?')[0] + '?after-exit=1'

Dropping the query rather than appending keeps a second press idempotent. It also leaves a directory-style url alone instead of rewriting it to /index.htmlverification-server.js serves / and /index.html from the same file, so both forms already work, and the shorter one is what a person actually types.

Verification

Served the patched file from a plain static server under two url shapes and pressed the button:

  • opened at / → navigates to /?after-exit=1, pathname stays /, page renders and the exit row appears
  • opened at a renamed file → navigates to <that name>?after-exit=1 and loads, where before the fix it went to a missing index.html and the page went blank

prettier --check passes on the file.

The page exit check navigated to a literal `index.html`, which only
works while the file keeps that name. It does not survive being copied
into an offline package and served from another host, where it is
usually renamed to avoid colliding with that site's own index: the
button then navigates to a url that does not exist.

The failure is quiet. Nothing is logged, the page simply stops
loading — on the browsers this page exists to test, where there is
often no usable devtools to explain it.

Reload the url the page was actually opened at instead. Dropping the
query rather than appending keeps a second press idempotent, and a
directory-style url stays as it is rather than being rewritten to
/index.html, which the bundled verification server serves identically.
@Fiona2016
Fiona2016 merged commit ff929c0 into publish Sep 1, 2026
5 checks passed
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.

1 participant