Skip to content
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

[Blazor WebAssembly Project Template] Change web app manifest extension to “webmanifest” #43755

Closed
1 task done
christianliebel opened this issue Sep 5, 2022 · 6 comments · Fixed by #43756
Closed
1 task done
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-pwa Issues related to building PWAs with Blazor

Comments

@christianliebel
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

The official file extension for the Web Application Manifest is webmanifest. This helps servers to deliver the file with the official media type (application/manifest+json). I propose changing the manifest's file extension in the Blazor WebAssembly project templates from "json" to "webmanifest".

Sources:

Additional context

No response

@javiercn
Copy link
Member

javiercn commented Sep 5, 2022

@christianliebel thanks for contacting us.

I imagine you might be referring to the manifest used by PWAs?

That would need to be handled at the static files level. @Tratcher do you have any thoughts? Would we be open to a PR that updates our mappings to support this? Do browsers follow the spec appropriately? What concrete, practical benefit does this change bring?

@javiercn javiercn added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Sep 5, 2022
@ghost
Copy link

ghost commented Sep 5, 2022

Hi @christianliebel. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@javiercn javiercn added feature-pwa Issues related to building PWAs with Blazor feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Sep 5, 2022
@christianliebel
Copy link
Contributor Author

christianliebel commented Sep 5, 2022

I imagine you might be referring to the manifest used by PWAs?

@javiercn Correct, I'm referring to the Web Application Manifest used by PWAs. My PR #43756 would change the file extension of the manifest created by the project template to "webmanifest", its official extension.

That would need to be handled at the static files level. @Tratcher do you have any thoughts? Would we be open to a PR that updates our mappings to support this? Do browsers follow the spec appropriately? What concrete, practical benefit does this change bring?

Yes, the static files mapping could be adjusted to include the official media type application/manifest+json for files with the "webmanifest" extension. For browsers, the actual file extension and media type shouldn't even matter (w3c/manifest#689 (comment)). So there's also no actual benefit, but it's the official file extension and media type registered at IANA.

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Sep 5, 2022
@christianliebel
Copy link
Contributor Author

christianliebel commented Sep 5, 2022

@javiercn @Tratcher The media type is already included in the media type map: https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs#L347

So changing the file extension is sufficient. 😇

@javiercn
Copy link
Member

javiercn commented Sep 5, 2022

@christianliebel thanks for the clarification.

I am fine if the change is benign. Which seems to be.

@javiercn
Copy link
Member

javiercn commented Sep 5, 2022

@christianliebel we talked about this and we will take your PR for .NET 8.0 once it passes on the CI.

Thanks for the contribution

@javiercn javiercn added this to the .NET 8 Planning milestone Sep 6, 2022
@mkArtakMSFT mkArtakMSFT added triaged enhancement This issue represents an ask for new feature or an enhancement to an existing one and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Oct 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-pwa Issues related to building PWAs with Blazor
Projects
None yet
8 participants
@SteveSandersonMS @danroth27 @christianliebel @javiercn @MackinnonBuck @TanayParikh @mkArtakMSFT and others