Skip to content

Conversation

@andreubotella
Copy link
Member

In the https://w3c.github.io/csswg-drafts/ mirror, if you append a spec's shortname without a level to the URL (https://w3c.github.io/csswg-drafts/css-grid, for example), you land on a page that redirects you to the current work of that spec. However, if you add a fragment to the URL, that fragment goes away in the redirect. This is an issue for MDN, for example.

The fragment goes away because currently redirects happen with meta refresh. This change uses <noscript> to make sure such redirects keep working when scripting is disabled, and then does a JS-based redirect that does preserve the fragment.

In the https://w3c.github.io/csswg-drafts/ mirror, if you append a
spec's shortname without a level to the URL
(https://w3c.github.io/csswg-drafts/css-grid, for example), you land
on a page that redirects you to the current work of that spec.
However, if you add a fragment to the URL, that fragment goes away in
the redirect. This is an issue for MDN, for example.

The fragment goes away because currently redirects happen with meta
refresh. This change uses `<noscript>` to make sure such redirects
keep working when scripting is disabled, and then does a JS-based
redirect that does preserve the fragment.
@andreubotella
Copy link
Member Author

@tabatkins PTAL

@tabatkins tabatkins merged commit 350449d into w3c:main Oct 5, 2022
@andreubotella andreubotella deleted the auto-builder-redirect-with-hash branch October 5, 2022 22:34
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.

2 participants