Repository navigation
Keep the gzip copy of dotnet.native.wasm - #19
Merged
Merged
Conversation
Gzip-only clients (TLS-inspecting proxies that remove br) would otherwise get the 108 MB runtime uncompressed wherever nginx does not compress on the fly: requests with a Via header, such as everything through CloudFront, and HTTP/1.0. Keeping that one copy costs 27.9 MB of the artifact; the other 520 copies (18.7 MB) still go. web.config keeps its gzip rules, which serve a .gz only where one exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 11, 2026
Review follow-up: as #16 does for Brotli, the Gzip encoding rule now applies only to 200, 206 and 304 responses, so an IIS error page for a .gz path gets no Content-Encoding header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gmurray81
approved these changes
Nov 11, 2026
gmurray81
added a commit
that referenced
this pull request
Nov 11, 2026
global.json takes vnext's version, which names only the Uno.Sdk. Both workflows install the newest .NET 10 SDK (setup-dotnet 10.0.x) instead of reading an SDK from global.json, and the deploy's step that pinned 9.0.315 for CI runs is gone. Visual Studio 2022 17.14 uses the newest SDK it can load, so it builds the net10.0 targets when a 10.0.1xx SDK is installed; the README says so. DropGzipCopies takes vnext's version from #19 (keep the dotnet.native.wasm gzip copy) and runs for net10.0-browserwasm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#14 dropped every gzip (
.gz) copy from the published site to shrink the artifact that each deployment downloads. This PR brings back one of them:_framework/dotnet.native.*.wasm.gz, the 108 MB runtime as a 27.9 MB download. It was the middle option discussed for #14: gzip-only clients keep a compressed runtime, which is the one file that matters, and the artifact keeps most of the saving.Changes
DropGzipCopiestarget: after publish, deleteswwwroot/**/*.gzexcept_framework/dotnet.native.*.wasm.gz.web.config: brings back the gzip rules Ship only Brotli copies of the WebAssembly site #14 removed, only as far as this one copy needs: the.gzMIME type, theGzip copyrewrite (it serves a.gzonly where one exists), theGzip encodingrule, and.gzin the wasm type andVarypatterns.Gzip encodingapplies only to 200, 206 and 304 responses, so an IIS error page for a.gzpath gets noContent-Encoding(the same check Set explicit Cache-Control headers for the WebAssembly site #16 adds for.br)..gzis_framework/dotnet.native.*.wasm.gz.Effect
The sizes are from the .NET 9 build. With #18 (.NET 10),
dotnet.native.wasmis about 4% larger, and so is its gzip copy..brcopies.dotnet.native.wasmas gzip again. The other files come as they are, or compressed on the fly by nginx where it does that.Why keep this one copy
No browser that can run the app is gzip-only. The .NET runtime refuses to start without WebAssembly SIMD and exception handling, which means Chrome/Edge 95+, Firefox 100+ or Safari 16.4+. All of them send
bron HTTPS, and page scripts can't changeAccept-Encoding.Who is gzip-only:
br. Cisco Secure Access, Check Point gateways with HTTPS inspection and Symantec ProxySG document this.What that means for this app's visitors: they are .NET developers evaluating the controls, many of them through the documentation, which embeds the samples. Many will be on company networks, which is where such gateways are deployed. So a group that is rare across the web is likely more common here. We have no data on its size.
What a gzip-only client downloads on a first visit (estimated from the measured file sizes):
.gzcopies (before #14).gzcopies (vnext now)Via(Squid does by default) or uses HTTP/1.0.ttf,.dat,.svg,.icoand.webmanifestuncompressed. Fordotnet.native.wasmthat was 31.7 MB, against 27.9 MB for the stored copy.Viaor HTTP/1.0: staging nginx compresses nothing for these requests (gzip_proxiedandgzip_http_versiondefaults).Via. CloudFront itself compresses only objects up to 10 MB, so without the copy the 108 MB runtime would go out uncompressed, unless production nginx setsgzip_proxied.Accept-Encoding: gzipfor every viewer, and then every visitor would get the gzip path (~47 MB instead of ~28 MB with Brotli).Merge order
web.config, so whichever of the two merges second needs a conflict resolved. I'll update this branch after Set explicit Cache-Control headers for the WebAssembly site #16 merges.DropGzipCopiescondition tonet10.0-browserwasm, and this PR edits the same target. Whichever merges second needs that line resolved.Verified
.gz,_framework/dotnet.native.*.wasm.gz. It passes this branch's Validate deployable site step, including the checks from Turn off the PWA service worker #12, Preload only the six Open Sans faces the samples use #13 and Ship only Brotli copies of the WebAssembly site #14.dotnet.native.wasm: a Brotli client getsContent-Encoding: br, a gzip-only client getsgzip, and a client that accepts neither gets the plain file.Content-TypeandVary: Accept-Encoding..gz, a missing runtime copy, and a runtime copy outside_framework. It checks the published files, notweb.config; the serving behaviour above was checked by hand on IIS Express, including that a 404 for a.gzpath gets noContent-Encoding.🤖 Generated with Claude Code