Re:Ask HN: Javascript best practices?
by mindviews on Monday September 21, 2009 @09:18PM
(#836008)
I like to use separate files for organization during development and then merge and minify for deployment. Just make sure you have an automated process because you don't want to make mistakes doing it by hand.
[ Parent
| on HN ]
Re:Ask HN: Javascript best practices?
by alexitosrv on Monday September 21, 2009 @10:21PM
(#836103)
Any tool suggestions for the job of minifying and deployment?
+1 for YUI
+2 Grok Douglas Crockford's DOM theory then optimize how your scripts use the DOM, it is very easy to abuse the DOM, don't. Grok the DOM.
Sprockets looks promising if you're using Ruby. Haven't had a chance to use it in a project yet. http://github.com/sstephenson/sprockets
Already mentioned, but django-compress if you're using django:
JSMin is also good.
Gzip?
Re:Ask HN: Javascript best practices?
by fretlessjazz on Tuesday September 22, 2009 @01:22AM
(#836338)
Apache should do this.
Make sure it actually does, too ... http://www.whatsmyip.org/http_compression/
Better yet, use Google Page Speed.