Developer forum

Forum » Feature requests » Replace HttpCompression module with standard IIS compression

Replace HttpCompression module with standard IIS compression

Morten Bengtson
Reply

There are some issues with the HttpCompression module that comes with Dynamicweb.

  1. The default settings specify that it should use deflate compression, but gzip is recommended for various reasons - google it :)
  2. The default browser on most Android devices does not support deflate - only gzip is supported, but there is a problem with the gzip compression, so the browser will not display pages correctly (sometimes only part of the page is rendered).

Will you consider replacing the HttpCompression module with the standard IIS gzip compression? We can do this ourselves by modifying the default web.config, but it would be nice if Dynamicweb came with reliable compression by default.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Morten

 

YES - it has been made already actually, right now only in 8.3 branch, but it has been discussed to move it to 7.2 and 8.2 as well.

 

It is going away from being a HttpModule that uses Sharpziplib to being a feature right on the pageview object using .NETs built in gzip compressor.

 

See screendump for new settings node in Management Center.

 

BR Nicolai

DynamicwebHttpCompressionSettings.PNG
 
Morten Bengtson
Reply

Hi Nicolai,

 

Why do we have to select either Gzip or Deflate? Wouldn't a checkbox to enable/disable compression be enough?

Then it could just check the "Accept-Encoding" header that is sent by the browser:

  1. if Accept-Encoding contains "gzip", use gzip compression
  2. else if Accept-Encoding contains "deflate", use deflate compression
  3. else - dont use compression.

I believe this is how the ControlResourcesHandler (used for combining js/css) handles compression.

 

 
Nicolai Høeg Pedersen
Reply

That is what will happen if you choose Gzip as preferred encoding which is what you choose

 
Morten Bengtson
Reply

OK, so it's the "preferred encoding" with fallback we choose here... got it :)