I have a site collection which needs to be compressed. So I followed Code Project Article here.

For that I have enabled both of the compression in my IIS > Compression setings as below screen:

enter image description here

Now when I see the site in the network panel of developer tools, it doesn't show content-encoding: gzip for the home page which has the mimeType as text/html; charset=utf-8.

Other than this mimeType, I was able to see the JS, CSS files are coming with response attribute of content-encoding:gzip. So I updated the applicationHost.config and added mimeType for text/html; charset=utf-8. See below config file:

enter image description here

Now my question is, is this the correct way to compress the site in GZip format?

Any other possible way for this?

How can I achieve the same without updating applicationHost.config? Can we do the same configuration in web application's web.config entry?

Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.