Skip to content

Blazor HeadOutlet rendering creates blank intermediate states #66475

@AdmiralSnyder

Description

@AdmiralSnyder

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I use <HeadContent> to insert <link rel="stylesheet"> tags into the head to include dynamic stylesheets
when i go from one HeadContent containing
<link rel="stylesheet" href="SomeUrl1">
to another HeadContent containing
<link rel="stylesheet" href="SomeUrl2">
there is an intermediate state being rendered by the browser where the headcontent is empty (or rather, maybe, during the replacement of the <link> tag in the header)

here's a video of how this looks. the red flashes at like second 4 are static fallbacks to a backgroundcolor - and they are the problem:

Screen.Recording.2026-04-25.225239.mp4

i'm gonna upload the repro solution soon, and link to it, a little later.

this even happens if the both HeadContents are outputting the same html fragments, which definitely shouldn't be the case.

Expected Behavior

the rendering of the head outlet should happen without an intermediate indeterminate state

Steps To Reproduce

i'm gonna upload the repro solution soon, and link to it, a little later.

Exceptions (if any)

No response

.NET Version

10.0.7

Anything else?

i'm using current edge to show the problem, but it happens on other browsers, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions