Skip to content

Discussion: Why is the 404 page rendered by the server? #2159

Open
@lindapaiste

Description

@lindapaiste

Right now the 404 not found page is generated as string of HTML and CSS and is returned directly by the server, no React involved.

The most obvious downside of this approach is that the text on this page will never get translated to the user's current language, which is a barrier to accessibility.

I'm researching this a bit and realizing that we do need to serve something different from the server in order to get the correct HTTP status code on the page (404 rather than 200). But it seems like the server should return more of a skeleton and let React inject the content. In fact, I think it could still return the same index page? react-router can be set up to display the "page not found" content when there is no matched route.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions