<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Conditional Compilation in JavaScript</title>
	<atom:link href="http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/</link>
	<description>Web development and Internet trends</description>
	<pubDate>Tue, 06 Jan 2009 04:24:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Thank you for 2008 - Happy New Year! - Robert&#8217;s talk - Web development and Internet trends</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-492997</link>
		<dc:creator>Thank you for 2008 - Happy New Year! - Robert&#8217;s talk - Web development and Internet trends</dc:creator>
		<pubDate>Tue, 30 Dec 2008 21:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-492997</guid>
		<description>[...] Conditional Compilation in JavaScript [...]</description>
		<content:encoded><![CDATA[<p>[...] Conditional Compilation in JavaScript [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-299773</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 10 Jun 2008 12:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-299773</guid>
		<description>Tanny,

That's great! Thanks for letting me know!
Personally, I use the &lt;a href="http://developer.yahoo.com/yui/compressor/" rel="nofollow"&gt;YUI Compressor&lt;/a&gt; since it seems most effective and haven't broken any script (conditional compilation excepted, then).</description>
		<content:encoded><![CDATA[<p>Tanny,</p>
<p>That&#8217;s great! Thanks for letting me know!<br />
Personally, I use the <a href="http://developer.yahoo.com/yui/compressor/" rel="nofollow">YUI Compressor</a> since it seems most effective and haven&#8217;t broken any script (conditional compilation excepted, then).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanny O'Haley</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-299394</link>
		<dc:creator>Tanny O'Haley</dc:creator>
		<pubDate>Tue, 10 Jun 2008 05:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-299394</guid>
		<description>Robert,
I have a version of &lt;a href="http://tanny.ica.com/ica/tko/test.nsf/jsmin.html" title="JSMin with support for Microsoft conditional comments" rel="nofollow"&gt;JSMin&lt;/a&gt; that keeps in conditional comments. I modified the javascript version by Franck Marcia.

What do you use to minify your code?</description>
		<content:encoded><![CDATA[<p>Robert,<br />
I have a version of <a href="http://tanny.ica.com/ica/tko/test.nsf/jsmin.html" title="JSMin with support for Microsoft conditional comments" rel="nofollow">JSMin</a> that keeps in conditional comments. I modified the javascript version by Franck Marcia.</p>
<p>What do you use to minify your code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-285391</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 27 May 2008 18:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-285391</guid>
		<description>pepelsbey,

Absolutely, that's one usage. :-)</description>
		<content:encoded><![CDATA[<p>pepelsbey,</p>
<p>Absolutely, that&#8217;s one usage. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pepelsbey</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-285272</link>
		<dc:creator>pepelsbey</dc:creator>
		<pubDate>Tue, 27 May 2008 16:16:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-285272</guid>
		<description>Thanks for reminding this cool feature )
So, now i have simple version targeting for emulating :hover pseudo-class on any elements by JS for IE6:
&lt;code&gt;var ltIE7 = false
/*@cc_on @if (@_jscript_version &#60;= 5.6) ltIE7 = true @end @*/&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for reminding this cool feature )<br />
So, now i have simple version targeting for emulating :hover pseudo-class on any elements by JS for IE6:<br />
<code>var ltIE7 = false<br />
/*@cc_on @if (@_jscript_version &lt;= 5.6) ltIE7 = true @end @*/</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284947</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 27 May 2008 10:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284947</guid>
		<description>philippe,

Well, I do hope people who read anything I have written, and with how this post is constructed too, do understand what my general stance is. :-)</description>
		<content:encoded><![CDATA[<p>philippe,</p>
<p>Well, I do hope people who read anything I have written, and with how this post is constructed too, do understand what my general stance is. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philippe voncken</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284930</link>
		<dc:creator>philippe voncken</dc:creator>
		<pubDate>Tue, 27 May 2008 09:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284930</guid>
		<description>Often, the specific problems could be avoided by using simple solutions. Sometimes, we attack a concrete wall that could be circumvent. 

I prefer to talk about solutions proposed by the standards rather than specific solutions. 

Your ticket is interesting but I would have preferred that you start by saying that this tricks is to be used with caution in mind that the standards are the path to the side clear of force in order to protect young developers and show the way to the right direction :)</description>
		<content:encoded><![CDATA[<p>Often, the specific problems could be avoided by using simple solutions. Sometimes, we attack a concrete wall that could be circumvent. </p>
<p>I prefer to talk about solutions proposed by the standards rather than specific solutions. </p>
<p>Your ticket is interesting but I would have preferred that you start by saying that this tricks is to be used with caution in mind that the standards are the path to the side clear of force in order to protect young developers and show the way to the right direction <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284876</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 27 May 2008 08:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284876</guid>
		<description>Grant,

You're welcome. :-)

Andreas,

Ah, too bad. Wonder why he would break that implementation?

Martin,

Yes, it's all about cutting requests too. :-)

Morgan,

Thanks!

philippe,

There is a difference what we find to be best in theory, and what's best in real life. As mentioned in the post, using proper approaches such as object detection isn't fool-proof, hence the nedd for a solution like this (just as using conditional comments has almost become a de-facto standard to overcome IE-specific problems).</description>
		<content:encoded><![CDATA[<p>Grant,</p>
<p>You&#8217;re welcome. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Andreas,</p>
<p>Ah, too bad. Wonder why he would break that implementation?</p>
<p>Martin,</p>
<p>Yes, it&#8217;s all about cutting requests too. <img src='http://www.robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Morgan,</p>
<p>Thanks!</p>
<p>philippe,</p>
<p>There is a difference what we find to be best in theory, and what&#8217;s best in real life. As mentioned in the post, using proper approaches such as object detection isn&#8217;t fool-proof, hence the nedd for a solution like this (just as using conditional comments has almost become a de-facto standard to overcome <acronym title="Internet Explorer">IE</acronym>-specific problems).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philippe voncken</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284866</link>
		<dc:creator>philippe voncken</dc:creator>
		<pubDate>Tue, 27 May 2008 08:30:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284866</guid>
		<description>Use a specific code of a browser is not a good practice. I think we must insist on this point to recall whenever one gives tips and tricks like this. 

The best interface is simple and minimalist, but it is perform that the user expects.

The best web code is the one that works with all browsers, because it is easier to maintain and it is accessible. Reduce to the minimum functional Javascript allows this.</description>
		<content:encoded><![CDATA[<p>Use a specific code of a browser is not a good practice. I think we must insist on this point to recall whenever one gives tips and tricks like this. </p>
<p>The best interface is simple and minimalist, but it is perform that the user expects.</p>
<p>The best web code is the one that works with all browsers, because it is easier to maintain and it is accessible. Reduce to the minimum functional Javascript allows this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morgan Roderick</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284404</link>
		<dc:creator>Morgan Roderick</dc:creator>
		<pubDate>Mon, 26 May 2008 20:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284404</guid>
		<description>Thank you for another nugget of wisdom Robert. Sometimes I feel that reading your blog is like going over stuff I've learned and forgotten again. 

So please keep the nuggets coming!</description>
		<content:encoded><![CDATA[<p>Thank you for another nugget of wisdom Robert. Sometimes I feel that reading your blog is like going over stuff I&#8217;ve learned and forgotten again. </p>
<p>So please keep the nuggets coming!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284297</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Mon, 26 May 2008 18:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284297</guid>
		<description>I've previously used this to detect whether the current browser is IE or not:
&lt;code&gt;&#60;!--[if lt IE 7]&#62;&#60;script src="/js/ltie7.js" type="text/javascript"&#62;&#60;/script&#62;&#60;![endif]--&#62;&lt;/code&gt;
Where ltie7.js contains the following:
&lt;code&gt;var ltIE7 = true&lt;/code&gt;
I feel like I can trust this method more than checking Navigator properties. Alltough, looking at this code now, I'm not sure why i put the code in a new file instead of just writing it in the script block…
The @cc_on-method is nice if you want to keep all your code in one place though.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve previously used this to detect whether the current browser is <acronym title="Internet Explorer">IE</acronym> or not:<br />
<code>&lt;!--[if lt <acronym title="Internet Explorer">IE</acronym> 7]&gt;&lt;script src=&#8221;/js/ltie7.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;&lt;![endif]&#8211;&gt;</code><br />
Where ltie7.js contains the following:<br />
<code>var ltIE7 = true</code><br />
I feel like I can trust this method more than checking Navigator properties. Alltough, looking at this code now, I&#8217;m not sure why i put the code in a new file instead of just writing it in the script block…<br />
The @cc_on-method is nice if you want to keep all your code in one place though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284279</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Mon, 26 May 2008 18:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284279</guid>
		<description>Nice! Didn't know about that. Too bad &lt;a href="http://joliclic.free.fr/php/javascript-packer/en/" rel="nofollow"&gt;Nicolas Martin's PHP-port of Dean's packer&lt;/a&gt; does not keep them in :/</description>
		<content:encoded><![CDATA[<p>Nice! Didn&#8217;t know about that. Too bad <a href="http://joliclic.free.fr/php/javascript-packer/en/" rel="nofollow">Nicolas Martin&#8217;s <acronym title="Hypertext PreProcessing">PHP</acronym>-port of Dean&#8217;s packer</a> does not keep them in :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Palin</title>
		<link>http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284176</link>
		<dc:creator>Grant Palin</dc:creator>
		<pubDate>Mon, 26 May 2008 17:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/2008/05/26/conditional-compilation-in-javascript/#comment-284176</guid>
		<description>That's pretty cool.  I can see that there are some cases where that sort of capability would be very useful.</description>
		<content:encoded><![CDATA[<p>That&#8217;s pretty cool.  I can see that there are some cases where that sort of capability would be very useful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
