Posts

Showing posts from April, 2011

Conditional compilation in IE

I normally know about conditional compilation of JS in IE using <!--[if gt IE 6] --> but here is something new I figured out today. var IE; //@cc_on IE = parseFloat(navigator.appVersion); The best part here is that the JS code stays in your JS files and does not uglify the HTML if you ever have to use conditional compilation. Here is some more information about it from MSDN article Conditional Compilation (Windows Scripting - JScript) .

Speed up your JavaScript

Image
This post is just for my own reference. Here are the slides and the video of the presentation by Nicholas Zakas. Goes into great detail in ways to improve the speed of your javascript code. Speed Up Your JavaScript View more presentations from Nicholas Zakas The article summarizes most of the points in the slides and video http://james.padolsey.com/javascript/zakas-javascript-performance-tips/