简体   繁体   中英

Closure-Compiler not Minify JavaScript enough for Google PageSpeed

I'm using the online Closure-Compiler tool to minify my JS files, then I'm running a test to analyze my site on Google PageSpeed tool.

Now for some reason PageSpeed is still suggesting me to minify my JS files even that I already did using the Closure Compiler.

Doesn't the "simple" minify option of Closure-Compiler is enough for PageSpeed?

For example this is what I get from PageSpeed:

Minifying http://example.com/scripts/default.min.js?8 could save 729B (2% reduction) after compression.


I'm using the compiler by adding a list of my scripts files from my server and selecting the "simple" option and let it do the magic.
I don't select any of the two "Formatting" options, as I don't know what are they doing, maybe that's the issue?

I will like to get your help to pass this rule please.
(I don't use command-line so if and I need to switch to an other tool it must have a UI please.)

Edit:
I'm also using mod_deflate on my server like so, if it makes any difference:

AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

PageSpeed lists all the things that could be improved at all. But you don't necessarily need to fix them all. This 2% reduction is very minor. Is this the biggest suggestion for your site? If so, I'd expect you're already doing a great job optimizing it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM