Skip to content

Blazor full-stack: server-only pages prerender before they 404, creating a jarring FOUC #51847

@gulbanana

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Visiting the /Error page from a link displays the page for a second while prerending and then falls back to a Not Found. Here's a demo:

firefox_hqeNJA4AqM.mp4

Expected Behavior

The page should be built in a way that will work on both client and server.

Steps To Reproduce

  1. Create a new Blazor Web App project with interactivity type Auto and interactivity location Global.
  2. If using RC2 instead of RTM, move the Error page from client to server as described here Creating a new Blazor Web App NET8 RC2 with WebAssembly Interactivity creates broken Error.razor page in Client project #51352 (comment)
  3. Add an <a href="/Error"> to the home page.
  4. Run the app and click on the link.

Exceptions (if any)

No response

.NET Version

8.0.100-rc.2.23502.2

Anything else?

No response

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Pillar: Complete Blazor WebPriority:3Work that is nice to havearea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onetriaged

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions