Skip to content

Conversation

Ivorforce
Copy link
Member

@Ivorforce Ivorforce commented Oct 4, 2025

Redirects currently don't work in Safari. The reason is that window.performance.getEntries()[0].responseStatus is unsupported.

Instead of checking in js whether we're 404-ing, I moved the script into the 404 page. This has the additional benefit that it is not loaded / run on any other pages except those that 404.

I tested the redirect (in Safari and Chrome) by changing fetch("/en/latest/_static/redirects.csv") into fetch("/_static/redirects.csv"), inserting /404.html,/engine_details/file_formats/gdscript_grammar.html into redirects.csv, and opening localhost:8001/404.html.

@Ivorforce Ivorforce requested a review from Calinou October 4, 2025 09:31
@Ivorforce Ivorforce added bug enhancement content:website Issues related to adding website features and fixing bugs, whether on the front or back-end content:redirect Issues and PRs involving moving content and adding a redirect rule on the backend labels Oct 4, 2025
…4 page instead of checking if we're on 404 via the API.
Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and LGTM, giving Calinou final approval.

@mhilbrunner
Copy link
Member

cc @Calinou

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Note that #11349 should be rebased to use this approach following this merge.

@mhilbrunner mhilbrunner merged commit ebf5aa3 into godotengine:master Oct 9, 2025
1 check passed
@mhilbrunner
Copy link
Member

Thank you! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:3.5 cherrypick:3.6 cherrypick:4.0 cherrypick:4.1 cherrypick:4.2 cherrypick:4.3 cherrypick:4.4 cherrypick:4.5 content:redirect Issues and PRs involving moving content and adding a redirect rule on the backend content:website Issues related to adding website features and fixing bugs, whether on the front or back-end enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants