I compress HTML page to with gzipper, and uploaded the files to azure app service.
when open the page url from browser, the page got with gzip encoding but the can't viewe the page content - it seems the page was not decoded
I compress HTML page to with gzipper, and uploaded the files to azure app service.
when open the page url from browser, the page got with gzip encoding but the can't viewe the page content - it seems the page was not decoded
You can try to add the following code to you web.config file to enable compression for both static and dynamic content.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
<httpCompression>
<dynamicTypes>
<clear />
<add enabled="true" mimeType="text/*"/>
<add enabled="true" mimeType="message/*"/>
<add enabled="true" mimeType="application/x-javascript"/>
<add enabled="true" mimeType="application/javascript"/>
<add enabled="true" mimeType="application/json"/>
<add enabled="false" mimeType="*/*"/>
<add enabled="true" mimeType="application/atom+xml"/>
<add enabled="true" mimeType="application/atom+xml;charset=utf-8"/>
</dynamicTypes>
<staticTypes>
<clear />
<add enabled="true" mimeType="text/*"/>
<add enabled="true" mimeType="message/*"/>
<add enabled="true" mimeType="application/javascript"/>
<add enabled="true" mimeType="application/atom+xml"/>
<add enabled="true" mimeType="application/xaml+xml"/>
<add enabled="true" mimeType="application/json"/>
<add enabled="false" mimeType="*/*"/>
</staticTypes>
</httpCompression>
</system.webServer>
</configuration>
Here is the reference may be helpful:Enabling gzip compression on Azure App Service