Add outdated MIME type in "recommended" nginx gzip options?

I’m setting up nginx as a reverse-proxy for IIS 7, and I noticed that the .js files served by IIS are not gzip-compressed by nginx. The reason is that services.nginx.recommendedGzipSettings sets the following list of MIME types to compress:

gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

Whereas IIS 7 serves .js files as application/x-javascript which is not on the list.

The question is, should I make a PR to add application/x-javascript to the list of types under recommendedGzipSettings? It will surely benefit at least some people; on the other hand, application/x-javascript is obsolete, and is no longer used in newest IIS versions.

(In the meantime, to resolve the problem for myself, I’ll either disable recommendedGzipSettings and specify the list myself, or allow IIS to compress the file by using an appropriate value of Accept-Encoding.)

Could do. I don’t think it will help many people as this MIME has been deprecated for a long time now.

So, do you think it’s worth adding, or not? :slight_smile:

Probably not :slight_smile: I’m pretty sure nginx ships without it.

Actually the nginx default is only text/html.

Latest debian: # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

If you want, you can add an option that is disabled by default, but I would also like to have an option which impacts man configuration.nix such that no Microsoft ecosystem related options are ever visible (same for Oracle, etc.). Also, it would preferably be implemented in such a way that there is a separate module isolating the proprietary integration bits such that the code remains easy to read in the more common case of not using such old tech.

Otherwise, who cares about outdated technology?

Well, it’s definitely not worth adding any kind of even remotely complicated setup.

By the way, the current options enabled by recommendedGzipSettings include gzip_disable "msie6";, so you already have MS-ecosystem related stuff in there. :wink:

1 Like