Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ronish Potiah 19 posts 171 karma points
    Dec 13, 2017 @ 07:42
    Ronish Potiah
    0

    Umbraco Cloud - Gzip compression

    Hi, I need to get gzip compression works on Umbraco cloud.

    I have added the below to my web.config under system.webServer but it doesn't seem to work.

    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
      <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
    
      <dynamicTypes>
        <add mimeType="text/*" enabled="true"/>
        <add mimeType="message/*" enabled="true"/>
        <add mimeType="application/javascript" enabled="true"/>
        <add mimeType="text/css" enabled="true"/>
        <add mimeType="*/*" enabled="false"/>
      </dynamicTypes>
    
      <staticTypes>
        <add mimeType="text/*" enabled="true"/>
        <add mimeType="message/*" enabled="true"/>
        <add mimeType="application/javascript" enabled="true"/>
        <add mimeType="text/css" enabled="true"/>
        <add mimeType="*/*" enabled="false"/>
      </staticTypes>
    
    </httpCompression>
    

    This currently works on local machine. I have also enabled static compression as follows:

     <location path="umbraco">  
    <system.webServer>  
      <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />  
    </system.webServer>  
    

    Any help is much appreciated. Maybe the path of the directory is not good. See http://issues.umbraco.org/issue/UAAS-380

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jan 24, 2018 @ 22:29
    Alex Skrypnyk
    0

    Hi Ronish

    Did you find a way to do it?

    /Alex

  • John Bergman 483 posts 1132 karma points
    Jan 25, 2018 @ 17:47
    John Bergman
    0

    This looks right too me.

    Is nothing being compressed? Have you looked with fiddler to see what your requests are returning?

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Sep 18, 2018 @ 21:42
    Chris Houston
    0

    Hi, These settings need to be added to the ApplicationHost.config file and not the web.config file.

    You can find more details about it here:

    https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpcompression/

    I am not sure what the answer is and if it's even possible to enable this on the Umbraco Cloud hosting platform as we don't have access to edit that file.

    If you use Kudu you can see the ApplicationHost.config file, but you are not given permission to view or edit it. I think this is something someone in the Umbraco Cloud team would need to answer?

    Cheers,

    Chris

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jan 24, 2019 @ 19:04
    Nicholas Westby
    0

    I'm curious about this as well. Easy enough to get GZip compression working with most files by modifying the web.config, but I would still need to modify the ApplicationHost.config file to enable GZip compression with SVG images (since SVG is a text format, it would compress well).

  • Mikulas Tomanka 2 posts 72 karma points
    Oct 21, 2019 @ 13:25
    Mikulas Tomanka
    0

    You can't control compression by modifying the web.config. Compression is controlled server-side by using an applicationHost.config as @ChrisHouston mentioned.

    You can not modify the applicationHost.config directly, however we will run any applicationHost.xdt transform in C:\home\site, essentially enabling SVG compression on your Cloud Site.

    As per: https://stackoverflow.com/questions/14410331/cant-get-iis7-to-gzip-font-face-font-files/23940235#23940235, in order to enable SVG, WOFF, EOT and TTF compression you'd need to add those in the config transform under dynamic and static types attributes.

    <?xml version="1.0"?> 
    <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> 
      <system.webServer> 
        <httpCompression xdt:Transform="InsertIfMissing">
          <staticTypes xdt:Transform="InsertIfMissing">
                <add mimeType="image/svg+xml" enabled="true" />
                <add mimeType="application/font-woff" enabled="true" />
                <add mimeType="application/x-font-ttf" enabled="true" />
                <add mimeType="application/octet-stream" enabled="true" />
          </staticTypes>
        </httpCompression>
      </system.webServer> 
    </configuration> 
    
  • Julien Kulker 75 posts 427 karma points c-trib
    Oct 21, 2019 @ 13:51
    Julien Kulker
    0

    We had the problem on umbraco cloud aswell. You are not able to do it yourself you should contact support for umbraco cloud. They need to set the setting properly

Please Sign in or register to post replies

Write your reply to:

Draft