Skip to content

Set StaticFileOptions.OnPrepareResponse = CacheHeaderSettings.SetCacheHeaders for Blazor static files endpoint #46085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

surayya-MS
Copy link
Member

Set StaticFileOptions.OnPrepareResponse = CacheHeaderSettings.SetCacheHeaders for Blazor static files endpoint

In the PR forgot to set StaticFileOptions.OnPrepareResponse = CacheHeaderSettings.SetCacheHeaders for Blazor static files endpoint.
By doing this now, we're allowing the browser to store a cached copy of the response, but telling it that it must check with the server for modifications (based on Etag) before using that cached copy.

@surayya-MS surayya-MS requested a review from a team as a code owner January 13, 2023 15:34
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jan 13, 2023
@surayya-MS surayya-MS requested a review from javiercn January 13, 2023 15:34
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

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

Great!

@surayya-MS surayya-MS enabled auto-merge (squash) January 13, 2023 16:31
@surayya-MS surayya-MS merged commit dfff223 into dotnet:main Jan 13, 2023
@ghost ghost added this to the 8.0-preview1 milestone Jan 13, 2023
@surayya-MS surayya-MS deleted the staticOptionsCacheSettings branch February 23, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants