<?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: Reliable IE 7 detection with JavaScript?</title>
	<atom:link href="http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/</link>
	<description>Hypertext rulez™</description>
	<pubDate>Sun, 07 Sep 2008 18:00:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: And Clover</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-4431</link>
		<dc:creator>And Clover</dc:creator>
		<pubDate>Tue, 21 Nov 2006 12:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-4431</guid>
		<description>&lt;blockquote&gt;@if (@_jscript_version == 7)&lt;/blockquote&gt;&lt;p&gt;Incidentally the correct _jscript_version value for IE7 is 5.7. (Similarly, IE6 is 5.6.)&lt;/p&gt;</description>
		<content:encoded><![CDATA[<blockquote><p>@if (@_jscript_version == 7)</p></blockquote>
<p>Incidentally the correct _jscript_version value for IE7 is 5.7. (Similarly, IE6 is 5.6.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ken snyder</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-4011</link>
		<dc:creator>ken snyder</dc:creator>
		<pubDate>Fri, 17 Nov 2006 23:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-4011</guid>
		<description>Unfortunately, IE7 has an option to disable native support for XMLHTTP.  Unchecking Tools &gt; Options &gt; Advanced &gt; "Enable native XMLHTTP support" causes window.XMLHttpRequest to be undefined.  Tested using following block:

&lt;code&gt;&#60;script&#62;
document.write(window.XMLHttpRequest);
&#60;/script&#62;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Unfortunately, IE7 has an option to disable native support for XMLHTTP.  Unchecking Tools > Options > Advanced > &#8220;Enable native XMLHTTP support&#8221; causes window.XMLHttpRequest to be undefined.  Tested using following block:</p>
<p><code>&lt;script&gt;<br />
document.write(window.XMLHttpRequest);<br />
&lt;/script&gt;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DannyB</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3697</link>
		<dc:creator>DannyB</dc:creator>
		<pubDate>Wed, 15 Nov 2006 19:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3697</guid>
		<description>You could use conditional compilation&#8230; untested but should work&#8230;
&lt;code&gt; isIE7 = false;
/*@cc_on
&#160;&#160;@if (@_jscript_version == 7)
&#160;&#160;&#160;&#160;isIE7 = true;
&#160;&#160;@end
@*/
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>You could use conditional compilation&#8230; untested but should work&#8230;<br />
<code> isIE7 = false;<br />
/*@cc_on<br />
&nbsp;&nbsp;@if (@_jscript_version == 7)<br />
&nbsp;&nbsp;&nbsp;&nbsp;isIE7 = true;<br />
&nbsp;&nbsp;@end<br />
@*/<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marko</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3637</link>
		<dc:creator>marko</dc:creator>
		<pubDate>Wed, 01 Nov 2006 15:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3637</guid>
		<description>Nick, true that... thanks!</description>
		<content:encoded><![CDATA[<p>Nick, true that&#8230; thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marko</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3636</link>
		<dc:creator>marko</dc:creator>
		<pubDate>Wed, 01 Nov 2006 14:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3636</guid>
		<description>Berislav, sometimes you simply can&#8217;t test for a method or object property.

Testing &lt;code&gt;typeof document.style.minHeight&lt;/code&gt; returns &lt;code&gt;string&lt;/code&gt; in all IE versions, but in IE 6 and lower, you can&#8217;t actually apply it, due to unsupported CSS property &lt;code&gt;min-height&lt;/code&gt;.

What&#8217;s even worse, some other &lt;code&gt;element.style&lt;/code&gt; object properties, that have unsupported CSS counterparts in IE 6 or lower (for example &lt;code&gt;document.style.maxHeight&lt;/code&gt;) return expectable &lt;code&gt;undefined&lt;/code&gt;, so there&#8217;s no key one could rely on.

Or maybe I&#8217;m missing something here...</description>
		<content:encoded><![CDATA[<p>Berislav, sometimes you simply can&#8217;t test for a method or object property.</p>
<p>Testing <code>typeof document.style.minHeight</code> returns <code>string</code> in all IE versions, but in IE 6 and lower, you can&#8217;t actually apply it, due to unsupported CSS property <code>min-height</code>.</p>
<p>What&#8217;s even worse, some other <code>element.style</code> object properties, that have unsupported CSS counterparts in IE 6 or lower (for example <code>document.style.maxHeight</code>) return expectable <code>undefined</code>, so there&#8217;s no key one could rely on.</p>
<p>Or maybe I&#8217;m missing something here&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Berislav Lopac</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3632</link>
		<dc:creator>Berislav Lopac</dc:creator>
		<pubDate>Tue, 31 Oct 2006 22:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3632</guid>
		<description>The best approach is not to test for browsers in general, but to test for only those features you need. If you need document.all, test for it, not for a particular version of IE.</description>
		<content:encoded><![CDATA[<p>The best approach is not to test for browsers in general, but to test for only those features you need. If you need document.all, test for it, not for a particular version of IE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleksandar</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3631</link>
		<dc:creator>Aleksandar</dc:creator>
		<pubDate>Tue, 31 Oct 2006 19:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3631</guid>
		<description>Wow, great tip about window.XMLHttpRequest, which I might find a use for, very soon.</description>
		<content:encoded><![CDATA[<p>Wow, great tip about window.XMLHttpRequest, which I might find a use for, very soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Fitzsimons</title>
		<link>http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3630</link>
		<dc:creator>Nick Fitzsimons</dc:creator>
		<pubDate>Tue, 31 Oct 2006 19:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.maratz.com/blog/archives/2006/10/31/reliable-ie-7-detection-with-javascript/#comment-3630</guid>
		<description>You don't need to use the triadic operator, as your bracketed condition returns a Boolean value. Just use
&lt;code&gt;
var ie7 = (document.all &#038;&#038; !window.opera &#038;&#038; window.XMLHttpRequest);
&lt;/code&gt;
(although the Conditional Comment method is rather elegant, IMHO.)</description>
		<content:encoded><![CDATA[<p>You don&#8217;t need to use the triadic operator, as your bracketed condition returns a Boolean value. Just use<br />
<code><br />
var ie7 = (document.all &#038;&#038; !window.opera &#038;&#038; window.XMLHttpRequest);<br />
</code><br />
(although the Conditional Comment method is rather elegant, IMHO.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
