-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add .webmanifest MIME type to Wasm.web.config for PWA support on Azure #121932
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
base: main
Are you sure you want to change the base?
Conversation
javiercn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/cc: @maraf
Co-authored-by: javiercn <[email protected]>
f18c35c to
04c11ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds IIS MIME type configuration for .webmanifest files to enable PWA support for Blazor WebAssembly applications deployed to Azure. The change resolves 404 errors that prevent PWA installation when manifest files are not recognized by IIS.
- Added MIME type mapping for
.webmanifestfiles withapplication/manifest+jsonfollowing W3C Web App Manifest specification - Follows existing IIS configuration pattern with
<remove>followed by<mimeMap>entries
| <mimeMap fileExtension=".dat" mimeType="application/octet-stream" /> | ||
| <mimeMap fileExtension=".json" mimeType="application/json" /> | ||
| <mimeMap fileExtension=".wasm" mimeType="application/wasm" /> | ||
| <mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" /> |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider enabling HTTP compression for .webmanifest files to improve load performance. Since the MIME type is application/manifest+json (JSON-based), these files are text-based and compress well.
Add the following line to the <httpCompression><dynamicTypes> section (around line 27):
<add mimeType="application/manifest+json" enabled="true" />Note: While .json files (which use application/json) are not currently compressed in this config, enabling compression for manifest files would be beneficial as they are typically downloaded on initial page load for PWA functionality.
Blazor WebAssembly PWA apps deployed to Azure fail to load manifest.webmanifest with 404 errors, preventing PWA installation. The IIS web.config lacks MIME type mapping for
.webmanifestfiles.Changes:
<remove fileExtension=".webmanifest" />and<mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" />tosrc/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Wasm.web.configThe MIME type
application/manifest+jsonfollows the W3C Web App Manifest specification. Pattern matches existing file extension handling in the config (.json,.wasm, etc.).Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.