I am using the tomcat connector (isapi_redirect.dll) to integrate with IIS 7.
After enabling both static & dynamic compression at website level using IIS Manager, the gzip compression is not working for only javascript files.
After little debugging, figured out that the Content-Type of .js request is also strangely not application/x-javascript as it should have been according to the mimeMapping applicationHost.config, instead it is application/javascript.
I've already tried adding mimeType application/javascript to applicationHost.config and also in web.config under httpCompression tag. But nothing worked.
Although enabling compression at Tomcat7 level works fine (accessing the site on port 8080).
I have also tried to use a different connector - http://tomcatiis.riaforge.org but the same issue - .js files doesn't compress.
Please help.
Change the mimeType of
jsfiles inTomcat7/conf/web.xmltoapplication/javascript.Also, there is no need to enable compression at Tomcat level, as it won't work when fronted by Apache/IIS.