OutFall
OutFall

Reputation: 482

How to GZIP compress JSON on IIS6?

JSON is added to mime types, it can be accessed just fine. Everything else is getting gzipped as expected. The only problem is JSON is not getting gzipped and webpagetest.org complains. IIS has been restarted

My MetaBase.xml for both IIsCompressionScheme gzip and deflate

    HcFileExtensions="htm
        html
        asp
        txt
        css
        js
        php
        rdf
        xml
        ttf
        json"

Is this even possible on IIS6?

Upvotes: 0

Views: 364

Answers (2)

cijagani
cijagani

Reputation: 523

Try this trick

Open C:\Windows\System32\inetsrv\config\administration.config with notepad and change the httpCompression tag:Modify the administration.config file as you can seen in image

Dynamic Content Compression feature require for that

Upvotes: 2

It have come to my attention that your frontend application must have this:

        headers : {
            "Content-Encoding" : "gzip"
        },

Enabled so it notifies the backend that gzip can be used.

FYI, if your JSON response is too small, gziping could actually make it slower. Just so you know.

Upvotes: 0

Related Questions