Skip to content

Instantly share code, notes, and snippets.

@ToeJamson
Last active December 18, 2015 17:19
Show Gist options
  • Save ToeJamson/5817784 to your computer and use it in GitHub Desktop.
Save ToeJamson/5817784 to your computer and use it in GitHub Desktop.
Fastest JavaScript Google Closure + gzip -9 + Memcache + CDN + Headers
java -jar compiler.jar \
--compilation_level ADVANCED_OPTIMIZATIONS \
--js code.js \
| gzip -c9 \
| wc -c
my_obj['some_val'] = m.some_val
my_obj.some_val = m.s
java -jar compiler.jar \
--compilation_level ADVANCED_OPTIMIZATIONS \
--js code.js > code.min.js
java -jar compiler.jar \
--compilation_level ADVANCED_OPTIMIZATIONS \
--js code.js \
| gzip -c9 \
| send-optimized.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment