Skip to content

Blazor initializer scripts are cached when they clearly have been changed- #46355

@Nickztar

Description

@Nickztar

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After upgrading to NET 7 and also upgrading some of my packages. A package that had a initializer script had some major changes and was still cached by the browser. This caused it to throw a exception on startup since the script is supposed to take care of the dll initialization.

I am not sure if this is something that blazor should be in charge of. Not really sure how blazor should be able to validate the integrity/change.

Expected Behavior

I expected that blazor would take care of validating that the SHA included in the blazor.boot.json is the one that is loaded into the page.

Steps To Reproduce

Turn on browser cache.
Load the page.
Change the lib.module.js file.
Load the page again and see that the lib.module.js file has not changed.

Exceptions (if any)

image

.NET Version

7.0.0

Anything else?

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions