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).

Comments

Popular posts from this blog

The best mobile development platform for hobbyist programmer

Using Voicemail with Airtel Prepaid Karnataka

Airtel 16Mbps for Impatient Ones