First turn on IIS management, select the site that I want to set up, and then find MIME types on the right side of the Ribbon to see if there is a. js option, if there is no hand work to add
Some words put the value of. js set to: Application/x-javascript remember not to be less and x some netizens introduction is Application/javascript
I have tried it under the WIN2008+IIS7 and it will not compress without X.
Of course, it is best to upload js before the JS to a compression this effect will be better. Can look for tbcompressor tool on the net, this tool compression is good
Just need your JS write standard, otherwise will be wrong, analysis of your JS grammar can not compress
IIS7 JS file to enable gzip after the solution is not compressed
IIS7 has enabled static file compression (Gzip) but anyway no compression, find after found is II7 MIME type setting problem
Set the MIME type of. js to Application/javascript
View the page again, and gzip is enabled.
However, a few days later found that some JS files are compressed, and some did not.
Find reason found is referencing JS file is not set type
<script></script>
<script src= "A.js" ></script>
Add type= "Text/javascript" type after the problem is resolved.