dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.61k stars 10.06k forks source link

Built-in support for client-side decompression of precompressed resources #26091

Open mrpmorris opened 4 years ago

mrpmorris commented 4 years ago

Problem

Regarding this advice to access compressed DLLs for static hosted websites https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-3.1#compression

When publishing to a static website it is obvious that building for Release results in smaller files than building for Debug. However, it is not obvious that we should then go to the Microsoft Docs pages and see if there is some JavaScript to use in order to reduce the download size even further.

Suggestion

Perhaps when creating a Blazor WASM app and ASP.NET Hosted is not selected, the template for the Index.html should include the suggested script in https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-3.1#compression by default.

It's better that the JS is there because it is prominent. The developer then has the option of removing it if they wish.

I imagine seeing a 14 MB download on first experience of using Blazor for a Release build would be enough to put many people off using it.

ghost commented 4 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

mrpmorris commented 4 years ago

@guardrex The host might not support web.config, they are static files that can be hosted anywhere.

guardrex commented 4 years ago

@mrpmorris Sorry about that. Not related. My bad. I'll remove that remark here.

ghost commented 3 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost commented 11 months ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.