Friday, December 11, 2009

JavaScript Optimization Tips


Always use the "var" deceleration for local variables.
Why? It tells JavaScript that the variable is local, i.e. JavaScript won't look for the variable in the outside scope.

Always use local decelerations for lookups that you use multiple times.
Why? JavaScript code isn't optimized, so lookups wont be cached.

Stumble
Delicious
Technorati
Twitter

0 Comments:

Post a Comment