ASP.NET Core 9.0 introduces the MapStaticAssets feature, offering enhancements over the previous UseStaticFiles middleware. It enables build time compression of assets using gzip and brotli, streamlining server configuration by eliminating the need for dynamic compression. ETags are also enhanced, using SHA-256 hashes for more efficient file versioning. Despite its advantages, MapStaticAssets doesn't yet support all features of UseStaticFiles.

3m read timeFrom bartwullems.blogspot.com
Post cover image
Table of contents
Static File middleware (before .NET 9)MapStaticAssets (starting from .NET 9)Let’s see it in action…More information

Sort: