How do I compress a Json result from ASP.NET MVC
By FoxLearn 2/18/2024 1:26:46 AM 385
Compression json results in reduced download size, which means that web pages load faster
To configure json compression, you can open the web.config file, then add the configuration as shown below.
<system.webServer> <urlCompression doDynamicCompression="true" /> <httpCompression> <dynamicTypes> <add mimeType="application/json" enabled="true" /> <add mimeType="application/json; charset=utf-8" enabled="true" /> </dynamicTypes> </httpCompression> </system.webServer>
Run your web site, then right-click-> Inspect, you can see your json results compressed with gzip.
- Basic Authentication in ASP.NET Core
- How to Implement Stripe Payment Gateway in ASP.NET Core
- Comparing ASP.NET SOAP Services and Core APIs
- How to fix System.InvalidOperationException: Scheme already exists: Identity.Application
- Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies
- Two-Factor Authentication with Google Authenticator in ASP.NET Core
- Implementing Passkeys to ASP.NET Core Application
- How to Implement Passkey Authentication in ASP.NET Core
Categories
Popular Posts
DASHMIN Admin Dashboard Template
11/17/2024
Freedash bootstrap lite
11/13/2024