NGINX GZip text/html compression

Hi I enabled the GZip compression based on the instructions from Hummingbird, however the text/html compression is still disabled. Text/Javascript and text/css looks fine.

Am I doing anything wrong?

Best regards,

Luis

  • Milan
    • WordPress Wizard

    Hello LUIS

    Hope you are well today and thanks for asking us. :slight_smile:

    Can you attach your .htaccess file here ? You’ll need to change its extension to “.txt” as we are not allowing sensitive extension files to be uploaded in our forum. Consider this is just one trick. :wink:

    Also would you please grant me support staff access so that I can check in depth regarding your issue ?. You can grant me support access via WPMU DEV > Support > Support Access > Grant Access.

    Cheers,

    Milan

  • Milan
    • WordPress Wizard

    Hello LUIS ,

    Hope you are well today. :slight_smile:

    Oh I missed that you are on NGINX, I thought you are on Apache and facing this issue. Sorry for this !! Now Did you grant us support staff access to your site ? I had requested you to grant us in my first reply. :slight_smile:

    Usually when you face issue which requires some further insights support staff access if first go. But as you haven’t done it yet, May I ask you to grant it one more time please ?

    Also where you have put the GZIP configurations, and the code for GZIP. ?

    Cheers,

    Milan

  • Adam Czajczyk
    • Support Gorilla

    Hello Luis!

    As your site is running on NGINX you may need to adjust NGINX configuration. If you do have access to it, please check it against “gzip_types” directive. There should be config similar to this below:

    server {
    gzip on;
    gzip_types text/plain application/xml text/html;
    ...
    }

    Best regards,

    Adam

  • LUIS
    • Flash Drive

    Hi Adam, below it’s the gzip directives in nginx.conf

    # Enable Gzip compression

    gzip on;

    # Compression level (1-9)

    gzip_comp_level 5;

    # Don’t compress anything under 256 bytes

    gzip_min_length 256;

    # Compress output of these MIME-types

    gzip_types

    application/atom+xml

    application/javascript

    application/json

    application/rss+xml

    application/vnd.ms-fontobject

    application/x-font-ttf

    application/x-javascript

    application/x-web-app-manifest+json

    application/xhtml+xml

    application/xml

    font/opentype

    image/svg+xml

    image/x-icon

    text/css

    text/plain

    text/javascript

    text/x-component;

    # Disable gzip for bad browsers

    gzip_disable “MSIE [1-6].(?!.*SV1)”;

    AFAIK the text/html compression is enabled by default since 0.8.29

    Enables gzipping of responses for the specified MIME types in addition to “text/html”. The special value “*” matches any MIME type (0.8.29). Responses with the “text/html” type are always compressed.

    So I’m wondering if it’s the hummingbird detection method problem because it keeps saying that text/html compression is disabled.

    Best regards,

    Luis

  • Adam Czajczyk
    • Support Gorilla

    Hello Luis!

    I took another look at nginx docs here: http://nginx.org/en/docs/http/ngx_http_gzip_module.html

    There’s indeed information that responses with the “text/html” type are always compressed and the mime types can be set to be compressed “in addition”. On the other hand a syntax explanation there suggests that the “text/html” is a default option and this usually means that explicitly setting other values should override the default settings. I admit however that this is a bit beyond me and I may be wrong about it so it’ll be better if I call Hummingbird developer for help here.

    I have already asked him for his advice on this so please keep track of this thread for further information and updates and I’ll let you know once I get a response.

    Best regards,

    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello Luis!

    I’m still waiting for a response from the developer but Danny’s advise sounds very reasonable and is taken from his own experience (Thanks @dalbeck!). I think that’s definitely worth a try. I think you should be able to switch PHP version via cPanel or ask your host if they could do this for you.

    Would you please give it a try and let me know if it helped?

    Best regards,

    Adam

  • Milan
    • WordPress Wizard

    Hello LUIS

    Hope you are well today ?

    Thanks for confirming your PHP version. It seems to me that now we should wait till developer reply here. :slight_smile: I’ve pinged him again to get him as soon as possible here. Meantime we appreciate your cooperation.

    Cheers,

    Milan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.