Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

 locked
httpCompression settings on a simple Azure Website RRS feed

Answers

  • You can turn on compression for both static and dynamic content types with the following configuration in application-level web.config:

    <system.webServer>
          <urlCompression doStaticCompression="true" doDynamicCompression="true" />
    </system.webServer>

    With the most recent update to the service we also made it easier to specify the specific dynamic and static MIME types that should be compressed.  You can now specify the dynamicTypes and staticTypes configuration elements in the application level web.config:

    <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>

    Thursday, December 19, 2013 7:14 PM

All replies

  • You can turn on compression for both static and dynamic content types with the following configuration in application-level web.config:

    <system.webServer>
          <urlCompression doStaticCompression="true" doDynamicCompression="true" />
    </system.webServer>

    With the most recent update to the service we also made it easier to specify the specific dynamic and static MIME types that should be compressed.  You can now specify the dynamicTypes and staticTypes configuration elements in the application level web.config:

    <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>

    Thursday, December 19, 2013 7:14 PM
  • Thank you. The problem was that i was under a proxy-server and i did not receive  zipped content. When i connect without proxy - everythink OK. I suppose  Azure site extenstions of Kudu might help me with tihs problem.
    Tuesday, December 24, 2013 6:39 AM
  • We have this installed on a few azure websites and are not seeing our assets gzip'd.
    Thursday, March 10, 2016 10:42 PM
  • Currently gzip is enabled by Azure App Service Windows by default. But my nodejs app already has gzip enabled. Double gzip will cause browsers couldn't decode response. So how can I disable it? Set all 'enabled' to "false" has no affect on this issue. 
    Tuesday, December 5, 2017 2:09 AM
  • @Shenghan It seems you’ve posted your question in a new thread and that’s been responded to already. You can continue your conversation on that thread since this one is quite old and also talks mainly about enabling gzip whereas your concern is to disable it.

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    Thursday, December 14, 2017 5:01 AM