<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>EricLaw's IEInternals</title><link>http://blogs.msdn.com/b/ieinternals/</link><description>A look at Internet Explorer from the inside out.</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.20496 (Build: 5.6.583.20496)</generator><item><title>Beware Silly Similes</title><link>http://blogs.msdn.com/b/ieinternals/archive/2012/02/07/beware-silly-similes.aspx</link><pubDate>Tue, 07 Feb 2012 17:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10265010</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;Recently, there was a blog post which described a browser security feature as "&lt;em&gt;like a seat-belt that snaps when you crash&lt;/em&gt;." &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;"&gt;&lt;span size="2" face="Verdana"&gt;This wasn&amp;rsquo;t a particularly noteworthy event because similes are pretty common in our field. Almost e&lt;/span&gt;&lt;span size="2" face="Verdana"&gt;veryone likes similes because they enable the simplification of highly technical topics into easily-conceptualized terms that anyone can understand. S&lt;/span&gt;&lt;span size="2" face="Verdana"&gt;imiles are like JPEGs &amp;ndash; they distill a big, complicated, intricate picture into a smaller (but still evocative) picture that bears some amount of resemblance to the original truth. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;In our headline-driven culture, where subtlety and nuance don't draw the clicks that a quick witticism can bring, a great simile will spread across the web like pollen on a spring morning.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;Of course, the downside&lt;sup&gt;1&lt;/sup&gt; is that, like JPEGs, the compression is lossy. Important information can be obliterated in the conversion process. Technical experts might observe the loss, but an everyday consumer may not detect the difference. In some cases, that&amp;rsquo;s fine, but in others it really isn&amp;rsquo;t.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;The problem with the simile in that recent blog post is that the information loss is unnecessarily high. The topic is complex, but that doesn't mean we can't use a simile&amp;mdash;we just need to think a little harder. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;Two more accurate similes immediately leap to mind. We could describe the security feature as&lt;br /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;"&lt;em&gt;Like a bicycle helmet that won&amp;rsquo;t prevent drowning if your boat sinks.&lt;/em&gt;" &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;Or we could say it&amp;rsquo;s &lt;/span&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;span style="font-family: verdana,geneva; font-size: small;"&gt;&lt;span size="2" face="Verdana"&gt;"&lt;em&gt;L&lt;/em&gt;&lt;/span&gt;&lt;span size="2" face="Verdana"&gt;&lt;em&gt;ike a flak jacket that can&amp;rsquo;t protect the lungs from chemical weapons.&lt;/em&gt;" &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;Both of these are accurate statements that more closely reflect reality. They convey to the everyday person the nuance that the feature doesn't protect against all attacks&amp;mdash;specifically, not those that it's not designed to protect against. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;It's absolutely fair to wonder "&lt;em&gt;Hey, why not develop a bike helmet that also acts as a life preserver?&lt;/em&gt;" Or, "&lt;em&gt;Why not replace flak-jackets with MechWarrior-style exoskeletons that protect against a full spectrum of attacks?&lt;/em&gt;" These are legitimate questions, to be sure, but neither mistakenly suggests that bike helmets or flak jackets don't have their place in the world as it exists today.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;The next time you hear a great simile, think carefully about what information its originator might have left out, and what motivations they may have had when crafting it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;-Eric&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: small;" size="2" face="Verdana"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;sup&gt;&lt;span size="1"&gt;1&lt;/span&gt; &lt;/sup&gt;&lt;/span&gt;&lt;span size="1"&gt;&lt;span style="font-size: xx-small;"&gt;Of course, if you're the one trying to convince someone to buy or adopt something, the loss of information that contradicts your point of view is considered an &lt;em&gt;upside&lt;/em&gt;, not a &lt;em&gt;downside&lt;/em&gt;.&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10265010" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/rants/">rants</category></item><item><title>The Hazards of Browser Quirks, continued</title><link>http://blogs.msdn.com/b/ieinternals/archive/2012/01/31/avoid-using-meta-to-specify-expires-or-pragma-in-html-markup.aspx</link><pubDate>Tue, 31 Jan 2012 16:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10262326</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10262326</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2012/01/31/avoid-using-meta-to-specify-expires-or-pragma-in-html-markup.aspx#comments</comments><description>&lt;p&gt;&lt;a name="_MailAutoSig"&gt;&lt;/a&gt;My First Law of Browser Quirks was introduced &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2010/09/22/cache-control-and-pragma-quirks-in-internet-explorer.aspx"&gt;a while ago&lt;/a&gt;: &lt;i&gt;If there&amp;rsquo;s a way for a site to take dependency on a browser quirk, and break if that quirk is removed, it will happen&lt;/i&gt;&lt;b&gt;. &lt;/b&gt;The Second Law of Browser Quirks is: &lt;i&gt;If there&amp;rsquo;s a way for a site to combine a set of browser quirks to yield an entirely unexpected behavior, it will happen&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;I was reminded of the Second Law a few weeks ago, when a site developer reported a bizarre behavior: namely, if they visited a page that was sent with &lt;span style="font-family: Courier New;" face="Courier New"&gt;Cache-Control: max-age=0&lt;/span&gt; a few times, they&amp;rsquo;d see that the first HTTP/200 response was correctly cached, and then conditional requests would properly get HTTP/304 Not Modified responses. The developer then deleted that page from the backend, and they&amp;rsquo;d see a HTTP/404 correctly come back for the next revalidation request. However, if the developer renavigated to the page a few times quickly, the previously-delivered HTTP/200 page would sometimes be &amp;ldquo;magically resuscitated&amp;rdquo; from the local cache.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;How&lt;/i&gt;, they wondered, &lt;i&gt;could that possibly happen&lt;/i&gt;?&lt;/p&gt;
&lt;p&gt;It was particularly strange because hitting the Refresh button would correctly show the 404 page.&lt;/p&gt;
&lt;p&gt;Fortunately, I had just recently updated the &lt;a href="http://getfiddler.com"&gt;Fiddler&lt;/a&gt; Caching Inspector, which examines a HTTP response to determine how it will be cached. A quick look at the Inspector led me to realize how this HTTP/404 page had yielded the unexpected result. Beyond specifying a &lt;span style="font-family: Courier New;" face="Courier New"&gt;Cache-Control: no-cache&lt;/span&gt; HTTP response header, the 404 page contained the following markup:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&amp;lt;meta http-equiv="Expires" content="0" /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Seeing caching directives in HTTP Markup always makes me a bit nervous, and it turns out that this is in fact the root cause of the problem. For historical reasons, Trident will respond to two directives in HTML markup:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&amp;lt;meta http-equiv="Pragma" content="no-cache" /&amp;gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&amp;lt;meta http-equiv="Expires" content="&lt;/span&gt;&lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html"&gt;&lt;i&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;HTTP-DATE&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;" /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No other directives (e.g. Cache-Control) are supported.&lt;/p&gt;
&lt;p&gt;Each of the two supported directives, if encountered, causes Trident to call down to WinINET to adjust the HTTP caching freshness &lt;i&gt;of the cache entry stored under the current URL&lt;/i&gt;. For the Pragma directive, if the current URL is HTTPS, Trident will call &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa383983(v=vs.85).aspx"&gt;DeleteURLCacheEntry&lt;/a&gt;; if the URL isn&amp;rsquo;t HTTPS, it will instead call &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa385396(v=vs.85).aspx"&gt;SetUrlCacheEntryInfo&lt;/a&gt; to adjust the time at which the document expires. For the Expires directive, the provided Date will simply be used as the new expiration time.&lt;/p&gt;
&lt;p&gt;Now, Fiddler&amp;rsquo;s Caching Inspector points out one more thing: &lt;b&gt;WinINET will never cache HTTP/404 response&lt;/b&gt;&amp;mdash;it will only modify the cache if it receives a HTTP/200, HTTP/206, or HTTP/3xx redirect status code. Sending a caching directive in the HTTP/404 markup was unnecessary, because IE won&amp;rsquo;t ever cache that error page. That&amp;rsquo;s not to say that the META tag does &lt;i&gt;nothing&lt;/i&gt;, however-- Trident doesn&amp;rsquo;t know (or care) that the document was sent with an uncacheable status code, and dutifully updates the expiration info for the&lt;i&gt; existing &lt;/i&gt;cache entry&amp;mdash;the HTTP/200 document that had originally been stored with in an expired state.&lt;/p&gt;
&lt;p&gt;Half of the puzzle is solved, but why does &lt;span style="font-family: Courier New;" face="Courier New"&gt;Expires=0&lt;/span&gt; result in the cache entry being deemed fresh? It&amp;rsquo;s especially surprising because if you send such an Expires directive using a HTTP header, the resulting cache entry will not be fresh.&lt;/p&gt;
&lt;p&gt;If WinINET downloads a response with an invalid Expires header (e.g. one that doesn&amp;rsquo;t contain a valid HTTPDATE value) and no other caching directives, it will mark the document as having expired one hour ago. Trident, however, has no such logic. If you specify an invalid time, Trident grabs the &lt;i&gt;current &lt;/i&gt;timestamp and uses &lt;i&gt;that &lt;/i&gt;as the expiration. Trident will also use the current timestamp if it encounters the &lt;span style="font-family: Courier New;" face="Courier New"&gt;Pragma: no-cache&lt;/span&gt; directive. If the user tries to re-navigate to the current document &lt;i&gt;during same exact second&lt;/i&gt; that the HTTP/404 was processed, the incorrectly-updated expiration of the existing cache entry will result in it being treated as fresh for that request. If the user hit the Refresh button or F5, the cache would be bypassed and the 404 page would be shown.&lt;/p&gt;
&lt;p&gt;The solution for this website was pretty simple&amp;mdash;either get rid of the unneeded META entirely (my recommendation) or update it to use a valid, long-ago HTTPDATE to avoid the incorrect update of the freshness info to the current timestamp. For instance, this markup:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&amp;lt;meta http-equiv="Expires" content="Sat, 11 Jun 2011 01:01:01 GMT" /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip;results in the cached entry being marked as Expired.&lt;/p&gt;
&lt;p&gt;Various bugs have been filed from this investigation, but my advice remains that web developers should do their very best to avoid specifying caching directives in markup.&lt;/p&gt;
&lt;p&gt;-Eric Lawrence&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10262326" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/caching/">caching</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/http/">http</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/problems/">problems</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/bugs/">bugs</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/wininet/">wininet</category></item><item><title>Authenticode and Weak Certificate Chains</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/20/internet-explorer-downloaded-file-was-reported-as-unsafe-by-winverifytrust-when-using-md2-or-md4.aspx</link><pubDate>Fri, 19 Aug 2011 23:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10198004</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10198004</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/20/internet-explorer-downloaded-file-was-reported-as-unsafe-by-winverifytrust-when-using-md2-or-md4.aspx#comments</comments><description>&lt;p&gt;Recently, someone attempted to download a deprecated version of the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=22185"&gt;Windows Script debugger&lt;/a&gt;. This tool was used to debug scripts prior to the introduction of more powerful, modern tools like those that are built into IE8 and later. The user emailed me when they encountered a very surprising outcome:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6102.image_5F00_07430EAD.png" width="661" height="79" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After clicking the Run button, the download proceeds, but then the user sees the message: &lt;em&gt;&lt;strong&gt;&amp;lt;filename&amp;gt; was reported as unsafe.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/1234.image_5F00_06D6DBB8.png" width="661" height="50" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The obvious question is &lt;strong&gt;&amp;ldquo;W&lt;em&gt;ho or what reported this file as unsafe?&amp;rdquo;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Many people might assume that this is a &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/05/17/smartscreen-174-application-reputation-in-ie9.aspx"&gt;SmartScreen&lt;/a&gt; warning, but it&amp;rsquo;s not. When SmartScreen blocks a piece of known-malware, it takes all the credit, as you can see in this screenshot:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/1200.image_5F00_31AF3FCA.png" width="661" height="61" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, if it&amp;rsquo;s not SmartScreen, where is the warning coming from?&lt;/p&gt;
&lt;p&gt;The answer is that the &lt;strong&gt;&amp;ldquo;&amp;lt;filename&amp;gt; was reported as unsafe&amp;rdquo;&lt;/strong&gt; message occurs when the &lt;a href="http://msdn.microsoft.com/en-us/library/aa388208(v=vs.85).aspx"&gt;WinVerifyTrust API&lt;/a&gt; reports that there&amp;rsquo;s a problem with a downloaded file&amp;rsquo;s digital signature. Pretty straightforward. You&amp;rsquo;d might see this error if you tried to &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/04/02/not-commonly-downloaded-warnings-will-be-shown-when-running-corrupt-or-incomplete-files.aspx"&gt;open an incompletely-downloaded file&lt;/a&gt;, for instance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;However&amp;hellip; &lt;/strong&gt;If you look at the signature in Windows Explorer, everything looks okay:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7181.image_5F00_066AA8C3.png" width="449" height="425" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In particular, you&amp;rsquo;ll notice that the signature is marked &lt;strong&gt;OK&lt;/strong&gt; at the top, and there&amp;rsquo;s a Timestamp at the bottom, which allows the signature to remain valid even after the certificate expires. However, that timestamp is twelve years old&amp;hellip; this is a &lt;em&gt;very&lt;/em&gt; old file.&lt;/p&gt;
&lt;p&gt;Now, if you click the &lt;strong&gt;View Certificate&lt;/strong&gt; button, &lt;em&gt;and&lt;/em&gt; you&amp;rsquo;re a regular reader of my blog, you&amp;rsquo;ll might be able to spot the problem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7587.image_5F00_05FE75CE.png" width="582" height="325" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See it?&lt;/p&gt;
&lt;p&gt;The problem is that the certificate itself is signed using the MD2 hash algorithm. This algorithm has known vulnerabilities and is not safe to use for untrusted content delivered over insecure networks. To that end, as I&amp;rsquo;ve mentioned in passing a &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/03/22/authenticode-code-signing-for-developers-for-file-downloads-building-smartscreen-application-reputation.aspx"&gt;couple &lt;/a&gt;of &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/03/20/ie9-final-release-rtw-minor-changes-list.aspx"&gt;times&lt;/a&gt; on this blog, Internet Explorer 8+ on Windows 7 SP1+ no longer accepts Authenticode signatures that use the&amp;nbsp;MD2 or MD4 hashing algorithms&amp;nbsp;in the certificate chain. (MD2 and MD4 on the &lt;em&gt;root&lt;/em&gt; itself isn&amp;rsquo;t a worry, because the &lt;em&gt;root&lt;/em&gt; itself is installed on the machine). This restriction is enforced by passing the &lt;a href="http://msdn.microsoft.com/en-us/library/aa388205(v=vs.85).aspx"&gt;WTD_DISABLE_MD2_MD4&lt;/a&gt; flag to WinVerifyTrust, instructing it to reject signatures that use either of these weak algorithms on the certificate chain. For the time being, Windows Explorer itself permits use of MD2 and MD4 in the signatures of locally-installed files, since the primary threat in today&amp;rsquo;s environment comes from code delivered using the Web.&lt;/p&gt;
&lt;p&gt;In the real world, downloads that are signed using deprecated algorithms prove to be quite uncommon, because relatively few software vendors were signing their packages in the late 1990s when MD2 and MD4 were in use. We&amp;rsquo;ve identified a few ancient installers on Microsoft&amp;rsquo;s Download Center that will need to be removed or re-signed using current certificates and newer algorithms (e.g. SHA-1) to present a stronger defense against skilled attackers that might try to spoof a digital signature.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10198004" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ActiveX/">ActiveX</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Best_2D00_Practices/">Best-Practices</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Win7/">Win7</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/certificate/">certificate</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/downloads/">downloads</category></item><item><title>Swapping out JQuery with Fiddler</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/19/using-fiddler-to-verify-a-jquery-update-will-fix-a-compatibility-problem.aspx</link><pubDate>Fri, 19 Aug 2011 22:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10197993</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10197993</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/19/using-fiddler-to-verify-a-jquery-update-will-fix-a-compatibility-problem.aspx#comments</comments><description>&lt;p&gt;This morning, someone asked me to look into a site-compatibility problem on a HTML5 demo site. When loading the site into IE9 and IE10, the F12 Developer Tools&amp;rsquo; Script Debugger showed the following error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Error Message: Object doesn't support property getElementsByTagName" border="0" alt="Error Message: Object doesn't support property getElementsByTagName" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8171.image_5F00_17279EAE.png" width="604" height="220" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now, obviously, IE does support getElementsByTagName, and I confirmed that the page is running in IE9 and IE10 Standards Modes in each respective browser version. The next thing that stood out to me is the filename: &lt;strong&gt;jquery-1.5.min.js&lt;/strong&gt;, which indicates that this is version 1.5&lt;span style="background-color: #ffff00;"&gt;.0&lt;/span&gt; of the popular JQuery JavaScript library. Back in March, &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/03/02/jquery-1-5-1-supports-ie9.aspx"&gt;Tony Ross celebrated the release of JQuery 1.5.1 on the IEBlog&lt;/a&gt;, noting that 1.5&lt;span style="background-color: #ffff00;"&gt;.1&lt;/span&gt; was the first version of the library to fully support IE9.&lt;/p&gt;
&lt;p&gt;So, it looks like this site might be using an outdated version of the library. But is it the outdated library that's causing this script error, and is upgrading to the latest JQuery enough to make the site work properly?&lt;/p&gt;
&lt;p&gt;In an &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/03/14/internet-explorer-hidden-images-styled-with-display-none-always-have-zero-0-height.aspx"&gt;earlier case&lt;/a&gt;, I had thought that a different&amp;nbsp;site might have been broken because it was using JQuery 1.4.4, but the developer upgraded to the latest JQuery and it didn&amp;rsquo;t help-- it turned out &lt;em&gt;that&lt;/em&gt; developer's code&amp;nbsp;was doing a User-Agent check and &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx"&gt;bailing out if it saw MSIE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, before I got in touch with the owners of today&amp;rsquo;s demo site, I wanted to make sure that upgrading JQuery was all they needed to do.&lt;/p&gt;
&lt;p&gt;Fortunately, Fiddler makes this task super easy. First, visit &lt;a href="http://jquery.com/"&gt;Jquery.com&lt;/a&gt; and download the JQuery library. If you plan on debugging into JQuery, get the &lt;strong&gt;Development &lt;/strong&gt;version; since I&amp;rsquo;m hoping a simple upgrade will alone suffice, I downloaded the smaller minified version and saved it to my desktop:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0160.image_5F00_2BACEE2C.png" width="661" height="79" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now, I booted Fiddler, and activated the AutoResponder tab. Using the &lt;strong&gt;Add&amp;hellip; &lt;/strong&gt;button, I created a new rule to map requests for JQuery-1.5.min.js to the newly downloaded jquery-1.6.2.min.js file I had just put on my desktop:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0245.image_5F00_3D8981F9.png" width="626" height="162" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Be sure to set the &lt;strong&gt;Unmatched requests passthrough &lt;/strong&gt;option to ensure that Fiddler doesn&amp;rsquo;t automatically generate 404s for requests that don&amp;rsquo;t match any of the rules.&lt;/p&gt;
&lt;p&gt;Now, I went back to the site in IE and hit CTRL+F5 in the browser to force it to reload all of the content from the network. Fiddler intercepts the request for the older JQuery and returns the newer one instead. Fiddler shows the AutoResponse line in blue in the WebSessions list:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6114.image_5F00_2B40BB37.png" width="459" height="127" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I was in luck-- with the new version of JQuery in place, the site ran correctly without any script errors, and the demo content worked beautifully! I could then confidently contact the site&amp;rsquo;s owner and request that they update their libraries, knowing that doing so will resolve the compatibility problem.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10197993" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/troubleshooting/">troubleshooting</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/fiddler/">fiddler</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ie9/">ie9</category></item><item><title>HTTP Methods and Redirect Status Codes</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/19/understanding-the-impact-of-redirect-response-status-codes-on-http-methods-like-head-get-post-and-delete.aspx</link><pubDate>Fri, 19 Aug 2011 18:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10197897</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10197897</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/19/understanding-the-impact-of-redirect-response-status-codes-on-http-methods-like-head-get-post-and-delete.aspx#comments</comments><description>&lt;p&gt;This crossed my &lt;a href="https://twitter.com/ericlaw"&gt;Twitter stream&lt;/a&gt; earlier today:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://techno-weenie.net/2011/8/19/ie9-deletes-stuff/"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/2086.image_5F00_240BE299.png" width="582" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&amp;rsquo;m not sure why we need a public service announcement to notify folks that Internet Explorer is behaving properly, but I guess there&amp;rsquo;s no harm in that. However, based on the lack of information provided, and the implication that this is surprising, I think the original actually poster meant to say something else.&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s explore this a bit. The HTTP/1.0 specification, &lt;a href="http://www.ietf.org/rfc/rfc1945.txt"&gt;RFC1945&lt;/a&gt; describes HTTP/301 as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;301 Moved Permanently &lt;br /&gt;The requested resource has been assigned a new permanent URL and any future references to this resource should be done using that URL. &lt;br /&gt; &lt;br /&gt;&lt;em&gt;// ...&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;&lt;span style="background-color: #ffff00;"&gt;Note: When automatically redirecting a POST request after receiving a 301 status code, some existing user agents will erroneously change it into a GET request.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The caveat in yellow also appears in the description for HTTP/302. Now, those &amp;ldquo;user agents&amp;rdquo; referred to in this remark included the popular browsers of the day, including Netscape Navigator and Internet Explorer. Arguably, this behavior is exactly what most websites wanted&amp;mdash;after a successful POST, send the user to a different URL to show them something else. However, the POST-converted-to-GET&amp;nbsp;behavior isn&amp;rsquo;t what the authors of HTTP had intended.&lt;/p&gt;
&lt;p&gt;The authors of &lt;a href="http://www.ietf.org/rfc/rfc2616.txt"&gt;RFC2616&lt;/a&gt; aimed to resolve the ambiguity by introducing two new redirection response codes in the HTTP/1.1 specification.&lt;/p&gt;
&lt;p&gt;As noted inside the updated definition of HTTP/302:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;Note: RFC 1945 and RFC 2068 &lt;span style="color: #ff0000;" color="#ff0000"&gt;specify that the client is not allowed to change the method&lt;/span&gt; on the redirected request.&amp;nbsp; However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In defense of the implementers of the day, if RFC1945 and RFC2068 really &lt;em&gt;do&lt;/em&gt; specify that the client user-agent is &amp;ldquo;&lt;span style="font-family: courier new,courier;"&gt;not allowed to change the method&lt;/span&gt;&amp;rdquo;, they don&amp;rsquo;t do so in a very obvious manner. This expectation is not mentioned in the definition of the response code, nor is it mentioned in the preamble about redirects. Unfortunately, the &lt;a href="http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-15#section-8.3.8"&gt;current HTTPBIS Draft&lt;/a&gt; appears to suffer from the same limitation, although I believe that shortcoming is being tracked by a workitem in their list.&lt;/p&gt;
&lt;p&gt;In RFC2616, the new&amp;nbsp;HTTP/303 redirect code is defined thusly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;The response to the request can be found under a different URI and SHOULD be &lt;span style="background-color: #ffff00;"&gt;retrieved using a GET&lt;/span&gt; method on that resource. This method exists primarily to allow the output of a POST-activated script to redirect the user agent to a selected resource.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, a 303 unambiguously means that the redirected request&amp;rsquo;s method should be changed to GET.&lt;/p&gt;
&lt;p&gt;Unfortunately, the newly&amp;nbsp;introduced definition of HTTP/307 failed to clearly specify&amp;nbsp;that the&amp;nbsp;original&amp;nbsp;method was&amp;nbsp;to be used-- the same problem that HTTP/302&amp;rsquo;s original definition suffered. However, it's obvious (based on the earlier text) that the &lt;em&gt;intent &lt;/em&gt;of the HTTP/307 response code was to clearly indicate that the client should preserve the original method&amp;nbsp;for the redirected request.&lt;/p&gt;
&lt;p&gt;So, together, HTTP/303 and HTTP/307 allowed web developers to be specific about what they wanted to happen to the method (&lt;strong&gt;303&lt;/strong&gt;-&amp;gt;Convert to GET; &lt;strong&gt;307&lt;/strong&gt;-&amp;gt;Keep original method).&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how well that has worked out...&lt;/p&gt;
&lt;h2&gt;Preserving Methods on Redirects&lt;/h2&gt;
&lt;p&gt;In this section, I&amp;rsquo;ll provide some cross-browser test results for a variety of scenarios. These are all generated using the XmlHttpRequest object and a &lt;a href="http://www.fiddler2.com/meddler/"&gt;Meddler Script&lt;/a&gt; file.&lt;/p&gt;
&lt;p&gt;The MeddlerScript is as follows:&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;import Meddler;&lt;/pre&gt;
&lt;pre&gt;import System;&lt;/pre&gt;
&lt;pre class="alt"&gt;import System.Net.Sockets;&lt;/pre&gt;
&lt;pre&gt;import System.Windows.Forms;&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="kwrd"&gt;class&lt;/span&gt; Handlers&lt;/pre&gt;
&lt;pre class="alt"&gt;{ &lt;/pre&gt;
&lt;pre&gt;    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;function&lt;/span&gt; OnConnection(oSession: Session)&lt;/pre&gt;
&lt;pre class="alt"&gt;    {&lt;/pre&gt;
&lt;pre&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (oSession.ReadRequest()){        &lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; oHeaders: ResponseHeaders = &lt;span class="kwrd"&gt;new&lt;/span&gt; ResponseHeaders();&lt;/pre&gt;
&lt;pre&gt;            oHeaders.Status = &lt;span class="str"&gt;"200 OK"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="alt"&gt;            oHeaders[&lt;span class="str"&gt;"Connection"&lt;/span&gt;] = &lt;span class="str"&gt;"close"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;            &lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; sRequestAsString = oSession.requestHeaders.ToString(&lt;span class="kwrd"&gt;true&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;) + System.Text.Encoding.UTF8.GetString(oSession.requestBodyBytes);&lt;/pre&gt;
&lt;pre&gt;                        &lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (oSession.urlContains(&lt;span class="str"&gt;'redir'&lt;/span&gt;))&lt;/pre&gt;
&lt;pre&gt;            {&lt;/pre&gt;
&lt;pre class="alt"&gt;                MessageBox.Show(sRequestAsString, &lt;span class="str"&gt;"Redirect Request"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oHeaders[&lt;span class="str"&gt;"Content-Type"&lt;/span&gt;] = &lt;span class="str"&gt;"text/plain"&lt;/span&gt;;    &lt;/pre&gt;
&lt;pre class="alt"&gt;                &lt;span class="kwrd"&gt;var&lt;/span&gt; s = oSession.GetQueryParams()[&lt;span class="str"&gt;"code"&lt;/span&gt;];&lt;/pre&gt;
&lt;pre&gt;                oHeaders.Status = s + &lt;span class="str"&gt;" redirect"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="alt"&gt;                oHeaders[&lt;span class="str"&gt;"Location"&lt;/span&gt;] = &lt;span class="str"&gt;'http://'&lt;/span&gt;+ oSession.requestHeaders[&lt;span class="str"&gt;"Host"&lt;/span&gt;] + &lt;span class="str"&gt;'/final.cgi'&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;                oHeaders[&lt;span class="str"&gt;"Cache-Control"&lt;/span&gt;] = &lt;span class="str"&gt;"max-age=0"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(oHeaders.ToString());&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"redirecting...\r\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;            }&lt;/pre&gt;
&lt;pre&gt;            &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (oSession.urlContains(&lt;span class="str"&gt;'final'&lt;/span&gt;))&lt;/pre&gt;
&lt;pre&gt;            {&lt;/pre&gt;
&lt;pre class="alt"&gt;                MessageBox.Show(sRequestAsString, &lt;span class="str"&gt;"Final Request"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oHeaders[&lt;span class="str"&gt;"Content-Type"&lt;/span&gt;] = &lt;span class="str"&gt;"text/plain"&lt;/span&gt;;    &lt;/pre&gt;
&lt;pre class="alt"&gt;                oHeaders[&lt;span class="str"&gt;"Cache-Control"&lt;/span&gt;] = &lt;span class="str"&gt;"max-age=0"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(oHeaders.ToString());&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"Final Request was:&amp;lt;br /&amp;gt;\r\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(sRequestAsString);&lt;/pre&gt;
&lt;pre class="alt"&gt;            }            &lt;/pre&gt;
&lt;pre&gt;            &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;            {&lt;/pre&gt;
&lt;pre&gt;                oHeaders[&lt;span class="str"&gt;"Content-Type"&lt;/span&gt;] = &lt;span class="str"&gt;"text/html"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(oHeaders);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;XMLHTTPRequest-based Redirect Test Harness&amp;lt;/title&amp;gt;\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;!doctype html&amp;gt;\r\n&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;script type='text/javascript'&amp;gt;\r\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"var xmlHttp; var i=0;"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"function doXHR(sMethod, sURI, sBody, iResponseCode){\r\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"i++; xmlHttp = new XMLHttpRequest();\r\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"\toutputdiv.innerHTML = '&amp;lt;pre&amp;gt;Beginning request #' + i + '...&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;';\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"\txmlHttp.onreadystatechange = stateChanged;\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"\txmlHttp.open(sMethod,sURI+'?code='+iResponseCode,true);\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"\txmlHttp.setRequestHeader('CustomHeader', 'CustomValue');\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"\txmlHttp.send(sBody);}\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"function stateChanged(){\n\t\nif (xmlHttp.readyState==4){\n data = xmlHttp.responseText; ResponseHeaders.innerHTML = '[#' + i + ']Script-accessible response headers were:&amp;lt;br/&amp;gt;&amp;lt;PRE&amp;gt;' + xmlHttp.getAllResponseHeaders() + data+ '&amp;lt;/pre&amp;gt;';}\n}\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                &lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"function BuildRequest(){ doXHR(document.getElementById('txtMethod').value, document.getElementById('txtURI').value,document.getElementById('txtBody').value, document.getElementById('txtCode').value);\n}\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                &lt;/pre&gt;
&lt;pre&gt;                &lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;/script&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;hr&amp;gt;Output: &amp;lt;div id='outputdiv'&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;Response: &amp;lt;span id='ResponseHeaders'&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/span&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                &lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;br /&amp;gt;&amp;lt;input type=text id='txtMethod' value='GET' /&amp;gt;&amp;lt;br /&amp;gt;\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;input type=text id='txtURI' value='/redir.cgi' /&amp;gt;&amp;lt;br /&amp;gt;\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;input type=text id='txtBody' placeholder='Request body text...' value = '' /&amp;gt;&amp;lt;br /&amp;gt;\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;input type=text id='txtCode' value='302' /&amp;gt;\n&amp;lt;br /&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                &lt;/pre&gt;
&lt;pre&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;button onClick='BuildRequest();'&amp;gt;Send Request&amp;lt;/button&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre class="alt"&gt;                oSession.WriteString(&lt;span class="str"&gt;"&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;\n"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;                &lt;/pre&gt;
&lt;pre class="alt"&gt;            }&lt;/pre&gt;
&lt;pre&gt;            &lt;/pre&gt;
&lt;pre class="alt"&gt;        }&lt;/pre&gt;
&lt;pre&gt;            &lt;/pre&gt;
&lt;pre class="alt"&gt;        oSession.CloseSocket();&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;pre class="alt"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;p&gt;In the first test, we examine HTTP/303 redirects:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3666.image_5F00_75B25CEB.png"&gt;&lt;img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/1513.image_5F00_thumb_5F00_0384A2E7.png" width="170" height="121" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table style="width: 402px;" border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;IE 6-10&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE converted to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Chrome 13&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE converted to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Firefox 6&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE converted to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Safari 5.1&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE converted to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Opera 11.5&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE converted to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;All browsers behave properly when receiving a HTTP/303 redirect code. Specifically, the client reissues the request after converting the DELETE method to a GET.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;In the next test, we examine HTTP/307 redirects:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4645.image_5F00_63699629.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/1106.image_5F00_thumb_5F00_156136B4.png" width="162" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table style="width: 402px;" border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;IE 6-10&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE method is preserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Chrome 13&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE method is preserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Firefox 6&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE method is preserved (after prompt)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Safari 5.1&lt;/td&gt;
&lt;td valign="top" width="340"&gt;DELETE method is preserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Opera 11.5&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Fails to redirect (after prompt)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;All browsers (except Opera 11.5, which appears to be buggy) will correctly preserve the request method after receiving a HTTP/307.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Developers will run into cross-browser differences when using the older HTTP/301 and HTTP/302 methods.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0511.image_5F00_3C2F4CF4.png"&gt;&lt;img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7457.image_5F00_thumb_5F00_1C144037.png" width="163" height="130" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table style="width: 402px;" border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;IE 6-10&lt;/td&gt;
&lt;td valign="top" width="340"&gt;&lt;span style="background-color: #ffff00;"&gt;DELETE method is preserved&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Chrome 13&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Firefox 6&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Safari 5.1&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Opera 11.5&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I believe that the highlighted result is what was surprising to the folks on Twitter. Only Internet Explorer avoids what RFC2616 calls "&lt;span style="font-family: courier new,courier;"&gt;erroneous&lt;/span&gt;" behavior, by preserving the DELETE Method after the HTTP/302 redirection. Other browsers respond to a HTTP/301 or HTTP/302 as they do to HTTP/303, converting the method to GET.&lt;/p&gt;
&lt;p&gt;But keep reading for another surprise...&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;This behavior mentioned in the last section was likely even more&amp;nbsp;surprising because Internet Explorer &lt;em&gt;does&lt;/em&gt; convert&lt;strong&gt; POST &lt;/strong&gt;to&lt;strong&gt; GET &lt;/strong&gt;for&lt;strong&gt; HTTP/301 &lt;/strong&gt;and&lt;strong&gt; HTTP/302&lt;/strong&gt;, like all other browsers:&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3755.image_5F00_7BF93379.png" width="167" height="123" /&gt;&lt;/p&gt;
&lt;table style="width: 402px;" border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;IE 6-10&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Chrome 13&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Firefox 6&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Safari 5.1&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Opera 11.5&lt;/td&gt;
&lt;td valign="top" width="340"&gt;
&lt;p&gt;Converts to GET&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;As alluded to earlier, IE's POST-&amp;gt;GET conversion for HTTP/301 and HTTP/302 is a historical artifact which was added in the 1990s for compatibility with the more popular web browsers of the time. Prior to the introduction of the XMLHttpRequest object, web pages could not really make use of other HTTP methods, which is why the method conversion is scoped to &lt;em&gt;just &lt;/em&gt;the POST method.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Notably, browsers also behave differently in handling a 302 response to a HEAD request:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6874.image_5F00_09CB7975.png"&gt;&lt;img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6403.image_5F00_thumb_5F00_50B49C72.png" width="167" height="137" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table style="width: 402px;" border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;IE 6-10&lt;/td&gt;
&lt;td valign="top" width="340"&gt;HEAD method is preserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Chrome 13&lt;/td&gt;
&lt;td valign="top" width="340"&gt;HEAD converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Firefox 6&lt;/td&gt;
&lt;td valign="top" width="340"&gt;HEAD converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Safari 5.1&lt;/td&gt;
&lt;td valign="top" width="340"&gt;HEAD converts to GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Opera 11.5&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Redirect is not followed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;It &lt;em&gt;seems &lt;/em&gt;like the unexpected conversion of HEAD into GET could lead to performance problems or functionality bugs.&lt;/p&gt;
&lt;h2&gt;Confirming Redirects&lt;/h2&gt;
&lt;p&gt;Now, RFC2616 also notes that redirects generally shouldn&amp;rsquo;t happen &amp;ldquo;automatically&amp;rdquo; except for idempotent / &amp;ldquo;safe&amp;rdquo; methods; the idea being that the user should have to confirm performing the same action on a different URL. In practice, a user is unlikely to have any idea what the prompt means, and thus most browsers ignore the requirement to confirm the redirection with the user.&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5126.image_5F00_02AC3CFD.png" width="168" height="123" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Browser Behavior on Warn on POST &amp;ndash;&amp;gt; 307 Redirect &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;table style="width: 400px;" border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;IE 6-10&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Silent re-post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Chrome 13&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Silent re-post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Firefox 6&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Prompts (no target URL) before reposting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Safari 5.1&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Silent re-post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="60"&gt;Opera 11.5&lt;/td&gt;
&lt;td valign="top" width="340"&gt;Prompts (with target info) but neither Yes nor No results in a request. Bug?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;Firefox's redirect confirmation prompt:&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Firefox prompts on a 307 response to a post" border="0" alt="Firefox prompts on 307 to a POST" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7853.image_5F00_6291303F.png" width="646" height="156" /&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;Opera's redirect confirmation prompt (&lt;/strong&gt;note: Doesn't seem to matter which of the three buttons you click&lt;strong&gt;)&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Opera prompts on a 307 response to a POST but will not reissue the request" border="0" alt="Opera prompts on a 307 response to a POST but will not reissue the request" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0842.image_5F00_095F4680.png" width="422" height="283" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hope this helps clear things up. In general, if you're using any method other than GET and you want to redirect,&amp;nbsp;use HTTP/303 and HTTP/307 to be very explicit about what you want to have happen.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10197897" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/http/">http</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/standards/">standards</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/wininet/">wininet</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/webdev/">webdev</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/interop/">interop</category></item><item><title>Sharpen the Saw</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/15/you-should-read-the-new-sysinternals-book.aspx</link><pubDate>Mon, 15 Aug 2011 00:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10195607</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10195607</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/15/you-should-read-the-new-sysinternals-book.aspx#comments</comments><description>&lt;p&gt;Gather round, young&amp;rsquo;ins, Grandpa Eric is going to tell you a story.&lt;/p&gt;
&lt;p&gt;Back in the old days, when I started writing software, programmers&amp;rsquo; utilities were sold in boxes in retail stores. You&amp;rsquo;d plunk down your 149 bucks or whatever (in &lt;em&gt;cash&lt;/em&gt;, kids, this was before credit cards got popular) and you&amp;rsquo;d get your cardboard box full of floppies (or maybe a CD, if you were cutting edge) and a manual. If you wanted to save a few bucks, you might hunt for a paper catalog or classified ad in a programmer&amp;rsquo;s journal and find a mail-order house to order from. You&amp;rsquo;d fill out a form, enclose a check, and wait a few weeks to get your box.&lt;/p&gt;
&lt;p&gt;Now, when I say you got &amp;ldquo;a manual&amp;rdquo;, I&amp;rsquo;m talking about the &lt;em&gt;real&lt;/em&gt; deal, a book a few hundred pages long, crafted with care to explain how to make use of what you&amp;rsquo;d bought. This wasn&amp;rsquo;t at all like what you get today if you happen to buy software that ships from Amazon or whatever, which usually consists of a little leaflet of disclaimers written by the lawyers, and maybe a little picture showing how to put the CD in the computer. Nor was a good manual like most of today&amp;rsquo;s online help files, which consist of what seem to be printouts of the functional spec. No, you got a book, which was thorough and written with the expectation that it would be read. The chapters would be logically organized, and usually included more than just the basics, giving examples, tips, and oftentimes, some little jokes or other signs that a human being was actually involved in the production. A good manual reinforced the developers&amp;rsquo; pride-of-craftsmanship&amp;mdash;if it was too awkward to write an explanation of how to use a feature, the embarrassed developers would be forced to redesign the feature, if only to allow the manual to pass the giggle-test.&lt;/p&gt;
&lt;p&gt;Things have changed in the last 15 years. These days, you just launch your browser and download your indispensible utilities, free of charge, in less time than you&amp;rsquo;ve spent reading so far. But something was lost in this paradigm shift, which is why I was so excited to hear that the legendary &lt;a href="http://technet.microsoft.com/en-us/sysinternals"&gt;Mark Russinovich&lt;/a&gt; had teamed up with all-around-smart guy &lt;a href="http://blogs.msdn.com/b/aaron_margosis/"&gt;Aaron Margosis&lt;/a&gt; to put together an honest-to-goodness &lt;em&gt;book&lt;/em&gt;, a guide to the &lt;a href="http://www.sysinternals.com"&gt;Sysinternals toolset&lt;/a&gt;. Titled &lt;a href="http://www.amazon.com/gp/product/073565672X/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=baydensystems&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399373&amp;amp;creativeASIN=073565672X"&gt;Windows Sysinternals Administrator&amp;rsquo;s Reference&lt;/a&gt;, can get it for your Kindle, or as I did, in old-fashioned dead-tree format, suitable for scribbling in and dog-earing to your heart&amp;rsquo;s content. I&amp;rsquo;ll admit that the title had me a bit worried (I don&amp;rsquo;t want to &lt;em&gt;administer&lt;/em&gt; anything, really), but I&amp;rsquo;m guessing that their publisher wouldn&amp;rsquo;t let them name the book more aptly (e.g. &amp;ldquo;&lt;em&gt;Using Sysinternals Tools to Demystify Shi^H^Hoftware&lt;/em&gt;&amp;rdquo;)&lt;/p&gt;
&lt;p&gt;Now, for the rare techie who&amp;rsquo;s not already a big fan of the Sysinternals tools, I&amp;rsquo;ll give a bit of background. The collection includes around 70 freeware utilities grouped into six loose categories (Process Utilities, Security Utilities, File and Disk Utilities, Networking Utilities, System Info, and Miscellaneous) the majority of which run on any version of Windows (XP and later). I&amp;rsquo;ve been using several of the tools on an almost daily basis for a decade. I use Sysinternals utilities to deeply understand the guts of every product I&amp;rsquo;ve ever worked on, and to resolve problems with many pieces of software I otherwise know little about..&lt;/p&gt;
&lt;p&gt;One of the perks of working in the Windows division at Microsoft is access to the source code of every version of Windows we&amp;rsquo;ve shipped in the last decade, but when I want to understand how our software works, I turn to &lt;a href="http://www.getfiddler.com/"&gt;Fiddler&lt;/a&gt; and the Sysinternals tools. Why? Because these utilities tell you the &lt;strong&gt;truth&lt;/strong&gt; and show what&amp;rsquo;s really going on. Source code is super-useful, of course, but it&amp;rsquo;s often much more challenging to dig through&amp;mdash;there are tens of millions of lines of code to sift through, and they interact in ways that were never formally documented, and sometimes, we find, ways that were never intended. The advantage of using monitoring utilities is that you get to see what&amp;rsquo;s happening, and that usually brings you 90% of the way to a solution. The ability to &amp;ldquo;peek inside&amp;rdquo; software as it runs is astonishingly empowering-- in the same way that xrays and MRIs have had a huge impact on the practice of medicine.&lt;/p&gt;
&lt;p&gt;Just booting Fiddler or Process Monitor and watching the events fly by will provide a non-trivial level of insight into how software on your computer works. But there&amp;rsquo;s a difference between toying with these utilities and fully exploiting their power, and this is where Mark and Aaron&amp;rsquo;s new book comes in. The book covers each of the tools and provides a full explanation of each; the two most useful tools (Process Explorer and Process Monitor) each get a chapter all their own, but even the most trivial of the utilities in the collection gets a page of coverage.&lt;/p&gt;
&lt;p&gt;As a developer myself, my favorite parts of the book are where the authors reveal some of the tools&amp;rsquo; &amp;ldquo;secrets&amp;rdquo;, explaining how they accomplish some interesting task. For instance, Process Explorer can be configured to replace the native Windows Task Manager&amp;mdash;a non-trivial exercise unless you know the clever trick of using &lt;strong&gt;Image File Execution Options &lt;/strong&gt;to remap one executable to another. Similarly, the &amp;ldquo;Jump To Registry Key&amp;rdquo; feature used throughout the suite simply relies on sending keys to the Registry Editor window, and is thus subject to the same &lt;a href="http://en.wikipedia.org/wiki/User_Interface_Privilege_Isolation"&gt;UIPI restrictions&lt;/a&gt; that prevent Low Rights IE add-ons from sending input to medium integrity applications. Lastly, I learned how the ps* Utilities are able to deliver their functionality to remote systems, despite the seeming impossibility of that task.&lt;/p&gt;
&lt;p&gt;My &lt;em&gt;other &lt;/em&gt;favorite parts of the book are the &amp;ldquo;&lt;em&gt;Case of the&amp;hellip;&lt;/em&gt;&amp;rdquo; sections that comprise the last three chapters&amp;mdash;each section explains how the authors (or their colleagues) have used one or more of the Sysinternals tools to solve a real-world problem. These sections are well-written, super-interesting, and provide a fantastic primer for turning what you&amp;rsquo;ve learned in the earlier chapters into real-world results.&lt;/p&gt;
&lt;p&gt;The book includes tons of facts about Windows itself that I&amp;rsquo;d forgotten or never picked up on to begin with. For instance, over the last half decade I&amp;rsquo;ve wondered about the &amp;ldquo;phantom&amp;rdquo; C:\Documents and Settings\ folder on Vista+ machines. I correctly guessed that the folder was still there for legacy compatibility reasons, but didn&amp;rsquo;t understand how it enhanced compat, since attempting to navigate to the folder somehow fails. Thanks to the book, I now know that this is a NTFS Junction pointed at C:\Users, but it is configured to deny the &lt;strong&gt;List Files &lt;/strong&gt;permission while allowing all other permissions. In this way, a legacy application can read or write a specific file inside C:\Documents and Settings\, while blocking the user from explicitly navigating into that path. Similarly, I learned that the 32bit &amp;ldquo;WOW64&amp;rdquo; subsystem can be uninstalled on the Core SKU of Windows Server, an interesting configuration tidbit for developers of any tool that includes 32bit components.&lt;/p&gt;
&lt;p&gt;Over the years, Windows has added a number of features previously only available in the Sysinternals tools&amp;mdash;the authors mention when this is the case, and compare and contrast the new Windows features to those in the Sysinternals utilities. For instance, on Windows 7, the command &lt;strong&gt;powercfg /energy &lt;/strong&gt;(see pg 375) generates a super-interesting report that I didn&amp;rsquo;t even know existed.&lt;/p&gt;
&lt;p&gt;No book is perfect, of course. The book&amp;rsquo;s structure enables the reader to jump directly to information about each specific tool, so anyone who reads the book cover-to-cover as I did will find some repetition of information between the sections and chapters. The authors&amp;rsquo; expectations of their readers&amp;rsquo; technical-savvy also seems uneven at some points&amp;mdash;I was amused that a book that discusses kernel debugging and memory-manager design would take the time to footnote the meaning of the word &amp;ldquo;string&amp;rdquo; as it is used in software. But, on the whole, the book is very well-written.&lt;/p&gt;
&lt;p&gt;As of this writing, the &lt;a href="http://www.amazon.com/gp/product/073565672X/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=baydensystems&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399373&amp;amp;creativeASIN=073565672X"&gt;Windows SysInternals Administrator&amp;rsquo;s Reference&lt;/a&gt; will set you back less than thirty bucks and it&amp;rsquo;s worth every penny&amp;mdash;heck, you could probably buy the EBook &lt;em&gt;and &lt;/em&gt;a &lt;a href="http://www.amazon.com/gp/product/B004HFS6Z0/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=baydensystems&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399373&amp;amp;creativeASIN=B004HFS6Z0"&gt;Kindle&lt;/a&gt; for less than this class of product would have sold for in the 1990s. Sure, you &lt;em&gt;can&lt;/em&gt; just download the tools for free, but I guarantee you&amp;rsquo;ll get more out of them if you read the book. If you develop or debug software on the Windows platform, this book will provide a great return on investment (purchase price &lt;em&gt;and&lt;/em&gt; reading time).&lt;/p&gt;
&lt;p&gt;-Eric Lawrence&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10195607" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/design/">design</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/dev/">dev</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Win7/">Win7</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/tools/">tools</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/troubleshooting/">troubleshooting</category></item><item><title>Internet Explorer 9.0.2 Update</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/12/internet-explorer-9.0.2-update-changes-file-protocol-and-cookie-naming.aspx</link><pubDate>Fri, 12 Aug 2011 18:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10195283</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10195283</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/12/internet-explorer-9.0.2-update-changes-file-protocol-and-cookie-naming.aspx#comments</comments><description>&lt;p&gt;Tuesday&amp;rsquo;s &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/08/09/ie-9-0-2-available-via-windows-update.aspx"&gt;Update for Internet Explorer&lt;/a&gt; updates the IE9 Help &amp;gt; About dialog&amp;rsquo;s version number to v9.0.2. The update includes a number of security and functionality fixes; many of these fixes are described in the More Information section of &lt;a href="http://support.microsoft.com/kb/2559049"&gt;KB2559049&lt;/a&gt;. One fix enables the IE9 Download Manager to properly save files on network drives where the user has limited permissions. Another fix helps ensure that IE8 can properly access sites that advertise IPv6 addresses when those sites are not reachable over IPv6 due to configuration errors on the site or the user&amp;rsquo;s network.&lt;/p&gt;
&lt;p&gt;Two of the security-related changes impact obscure Internet Explorer behaviors in &lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;all supported browser versions (IE6 to IE10)&lt;/strong&gt;&lt;/span&gt; -- I&amp;rsquo;ll discuss both of these changes in this post.&lt;/p&gt;
&lt;h2&gt;New restrictions on use of&amp;nbsp;the file:// Protocol&lt;/h2&gt;
&lt;p&gt;Prior to this update, Internet Explorer would allow non-file-protocol (e.g.&amp;nbsp;HTTP and HTTPS)-delivered pages to&amp;nbsp;frame (e.g.&amp;nbsp;using an IFRAME) or navigate to pages that were delivered using the file:// protocol scheme. IE would only block loading of resources from the local computer (e.g. file:///C:/temp/test.gif), but resources from non-local paths would be allowed. &lt;a href="http://www.debugtheweb.com/test/protocol/file.aspx"&gt;Here&amp;rsquo;s an example page&lt;/a&gt; displayed in IE 9.0.1:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3007.image_5F00_009736F9.png" width="542" height="365" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And here&amp;rsquo;s the same page loaded into IE 9.0.2:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3021.image_5F00_074A407C.png" width="549" height="370" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Other browsers have blocked cross-protocol interactions for quite some time. Here are screenshots of the Firefox 5, Chrome 14, and Opera 11.5 developer consoles in this scenario:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7215.image_5F00_672F33BE.png" width="566" height="145" /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7416.image_5F00_600FF746.png"&gt;&lt;img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4572.image_5F00_thumb_5F00_6DE23D41.png" width="664" height="81" /&gt;&lt;/a&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8284.image_5F00_4DC73084.png" width="688" height="73" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By default, this new restriction only applies to &lt;strong&gt;iexplore.exe&lt;/strong&gt; and &lt;strong&gt;explorer.exe&lt;/strong&gt; (to support Windows XP). This restriction applies only to pages running in the &lt;strong&gt;Internet&lt;/strong&gt; and &lt;strong&gt;Restricted Sites&lt;/strong&gt; Zones.&lt;/p&gt;
&lt;p&gt;We do not expect significant compatibility impact from this change, as no popular sites in the affected Zones rely upon the ability to pull in file://-sourced content. In the event of an problem, the user may add the HTTP/HTTPS site to the Trusted Sites zone and the file-protocol-sourced content will load as it did prior to this update.&lt;/p&gt;
&lt;h2&gt;Cookie Filenames are Randomized&lt;/h2&gt;
&lt;p&gt;As a rule, Internet Explorer attempts to prevent Internet sites from storing content in predictable locations on the local computer, in order to foil a number of attack types. That rule is why, for instance, the Internet-cache stores content in &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/03/19/wininet-temporary-internet-files-cache-and-explorer-folder-view.aspx"&gt;randomly-named subfolders&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Prior to this update, Cookies were an exception to this behavior&amp;mdash;their location was insufficiently random in many cases. Generally, cookie files were stored under the \AppData\Roaming\Microsoft\Windows\Cookies folder, in files named using the user&amp;rsquo;s login name, an@ symbol, and a partial hostname for the cookie&amp;rsquo;s domain:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5661.image_5F00_2DAC23C7.png" width="498" height="242" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Given sufficient information about the user&amp;rsquo;s environment, an attacker might have been able to guess the location of a given cookie and use this information in a multi-stage attack.&lt;/p&gt;
&lt;p&gt;To mitigate this threat, Internet Explorer 9.0.2 now names the cookie files using a randomly-generated alphanumeric string. Cookies are not instantly renamed on upgrade, but are instead renamed as soon as any update to the cookie&amp;rsquo;s data occurs. You can see the impact thusly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6232.image_5F00_0D91170A.png" width="497" height="236" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We do not expect significant compatibility fallout from this change either, as the names of these files have always been somewhat dynamic. Directly enumerating or reading the Cookie files has never been supported. Instead, local applications that wish to interact with cookies can use the InternetGetCookieEx and IEGetProtectedModeCookie APIs, or they can use the WinINET &lt;a href="http://msdn.microsoft.com/en-us/site/aa384026"&gt;cache-enumeration functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10195283" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/design/">design</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/cookies/">cookies</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Zones/">Zones</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/IEUpdate/">IEUpdate</category></item><item><title>Please don't make XHR run in synchronous mode</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/03/do-not-use-xmlhttprequest-in-synchronous-mode-unless-you-like-to-hang.aspx</link><pubDate>Wed, 03 Aug 2011 22:47:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10192584</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10192584</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/03/do-not-use-xmlhttprequest-in-synchronous-mode-unless-you-like-to-hang.aspx#comments</comments><description>&lt;p&gt;&lt;em&gt;8.4% of all hangs in IE9 in the past month are caused by XMLHttpRequest objects blocking the UI thread with a synchronous request.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/wer/archive/2011/08/03/why-you-should-use-xmlhttprequest-asynchronously.aspx"&gt;http://blogs.msdn.com/b/wer/archive/2011/08/03/why-you-should-use-xmlhttprequest-asynchronously.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If your page uses XHR in synchronous mode, your first thought should be "&lt;em&gt;I'm doing something wrong&lt;/em&gt;."&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10192584" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/rants/">rants</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/webdev/">webdev</category></item><item><title>Default Integrity Level and Automation</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/08/03/internet-explorer-automation-protected-mode-lcie-default-integrity-level-medium.aspx</link><pubDate>Wed, 03 Aug 2011 16:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10192483</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10192483</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/08/03/internet-explorer-automation-protected-mode-lcie-default-integrity-level-medium.aspx#comments</comments><description>&lt;p&gt;Over &lt;a href="http://stackoverflow.com/questions/6909226/ie-navigate2-fails-with-protected-mode-off"&gt;on StackOverflow&lt;/a&gt;, danimajo asked for help in an interesting scenario. Basically, he&amp;rsquo;s trying to drive Internet Explorer through automation, but finds that when he navigates to an Intranet site, the hidden browser instance appears and he can no longer control it. What&amp;rsquo;s going on?&lt;/p&gt;
&lt;h3&gt;Background on Protected Mode&lt;/h3&gt;
&lt;p&gt;Internet Explorer&amp;rsquo;s &lt;a href="http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx"&gt;Protected Mode&lt;/a&gt; is a security sandbox that relies upon the integrity level system in Windows. A process may have only one integrity level (IL), so if you navigate an IE instance between a Internet (Protected Mode, LowIL) and Intranet (non-Protected Mode, MediumIL) site, Internet Explorer must handle the navigation in a new process. In IE7 on Vista, this was very visible&amp;mdash;a new browser window would open automatically. In IE8, with the introduction of &lt;a href="http://blogs.msdn.com/b/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx"&gt;Loosely-Coupled IE&lt;/a&gt; (LCIE), we can handle this more subtly.&lt;/p&gt;
&lt;h3&gt;Background on Loosely-Coupled IE&lt;/h3&gt;
&lt;p&gt;In LCIE, IE always has at least two processes&amp;mdash;the browser &lt;strong&gt;Frame Manager&lt;/strong&gt; process (which always runs at MediumIL unless you start IE as admin) and one or more browser &lt;strong&gt;Tab Content&lt;/strong&gt; processes, which run at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LowIL for Protected Mode sites&lt;/li&gt;
&lt;li&gt;MediumIL for Intranet/Trusted sites&lt;/li&gt;
&lt;li&gt;HighIL (if IE is started as Admin)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because the Frame Manager process can &amp;ldquo;visually&amp;rdquo; host tabs of any integrity level, if the user navigates a page from a LowIL zone to a MediumIL zone, the Frame Manager process can silently swap out the current tab process with a tab process running at a different integrity level. This operation is called a &amp;ldquo;Virtual Tab switch.&amp;rdquo;&lt;/p&gt;
&lt;h3&gt;Losing Control&lt;/h3&gt;
&lt;p&gt;For compatibility with the most likely scenarios, Internet Explorer assumes that the default tab process will be a Low Integrity tab. Hence, when Internet Explorer is created by COM Automation, the tab process defaults to a Low Integrity tab. If the browser determines that the navigation requires a Medium Integrity Tab Content process, a virtual tab switch is performed. Now, here&amp;rsquo;s where things get interesting&amp;mdash;because the script or code driving Internet Explorer via Automation has a reference to the now-irrelevant tab process, it loses control.&lt;/p&gt;
&lt;h3&gt;Regaining Control&lt;/h3&gt;
&lt;p&gt;Now, it&amp;rsquo;s &lt;em&gt;possible &lt;/em&gt;for the caller to handle this situation, by trapping the &lt;a href="http://msdn.microsoft.com/en-us/library/cc288084(v=vs.85).aspx"&gt;NewProcess event&lt;/a&gt; and reacting accordingly. However, this requires a fair bit of code, and in some cases it might be desirable for an automation caller to simply evaluate its own needs (e.g. it is only configured to navigate to &lt;strong&gt;Intranet&lt;/strong&gt; pages) and invoke an instance of Internet Explorer running at MediumIL to start with. In languages like C++ and C#, this is easy, just CoCreate an instance of CLSID_InternetExplorerMedium ("{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}"). When using this CLSID, the object will default to a MediumIL Tab Content process. How this works under the covers is pretty simple: the registry key &lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;HKEY_CLASSES_ROOT\CLSID\{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}\LocalServer32&lt;/span&gt; contains a REG_EXPAND_SZ with the value &lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;"%ProgramFiles(x86)%\Internet Explorer\iexplore.exe" -startmediumtab&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, as far as I can tell, there&amp;rsquo;s no way for scripting languages like VBScript or JavaScript running in CScript or WScript to pass a CLSID into &lt;a href="http://www.devguru.com/technologies/wsh/quickref/wscript_CreateObject.html"&gt;CreateObject&lt;/a&gt;&amp;mdash;it only accepts a ProgID. &lt;em&gt;&lt;strong&gt;&lt;span style="color: #ff0000;"&gt;UPDATE&lt;/span&gt;:&amp;nbsp;&lt;/strong&gt;WndSks noted in the comments below&amp;nbsp;that you can use the syntax &lt;/em&gt;&lt;span style="color: #008000; font-family: courier new,courier;"&gt;Set IE = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s no ProgID that maps to CLSID_InternetExplorerMedium, but you can trivially create one with a simple registry update.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2" color="#0000ff"&gt;Windows Registry Editor Version 5.00&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2" color="#0000ff"&gt;[HKEY_CLASSES_ROOT\InternetExplorer.ApplicationMedium]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2" color="#0000ff"&gt;[HKEY_CLASSES_ROOT\InternetExplorer.ApplicationMedium\CLSID] &lt;br /&gt;@="{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}"&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After that, you can invoke a MediumIL instance of IE from script like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-size: x-small;" size="2"&gt;&lt;span style="color: #008000;" color="#008000"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;Set IE = CreateObject("InternetExplorer.ApplicationMedium") &lt;br /&gt;' IE.Visible = false&amp;nbsp; ' This is the default &lt;br /&gt;IE.Navigate2 &amp;ldquo;&lt;/span&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;http://intranetpage/&amp;rdquo;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So long as you navigate this instance only to pages that run outside of Protected Mode, your automation code will not lose its reference and the Internet Explorer window will remain invisible, unless you explicitly change the visible property.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10192483" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/dev/">dev</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/UAC/">UAC</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Zones/">Zones</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/interop/">interop</category></item><item><title>Best Practice: Get your HEAD in order</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx</link><pubDate>Mon, 18 Jul 2011 21:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10187650</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>18</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10187650</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx#comments</comments><description>&lt;p&gt;To ensure optimal performance and reliability when rendering pages, you should order the elements within the HEAD element carefully. First, I&amp;rsquo;ll explain the optimal order, and then explain the reasoning for this structure.&lt;/p&gt;
&lt;h3&gt;Optimal Head Ordering&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: x-small;" face="Courier New" size="2"&gt;&amp;lt;doctype&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;html&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv content-type &lt;span style="color: #ff0000;" color="#ff0000"&gt;charset&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&lt;span style="font-size: x-small;" size="2"&gt;&lt;i&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/i&gt;&amp;lt;meta http-equiv &lt;span style="color: #ff0000;" color="#ff0000"&gt;x-ua-compatible&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&lt;i&gt; &lt;br /&gt;&lt;/i&gt;&lt;span style="font-size: x-small;" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;base&lt;/span&gt;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title, favicon, comments, script blocks, etc&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Why Order Matters&lt;/h3&gt;
&lt;p&gt;In order to understand why the ordering of the elements in the HEAD matters, it&amp;rsquo;s important to understand how the browser parses webpages, and what impact each element has on the parsing of the page.&lt;/p&gt;
&lt;p&gt;When the browser begins parsing a page, it begins reading the bytes of the HTTP response body. If the response&amp;rsquo;s &lt;strong&gt;Content-Type&lt;/strong&gt; header specifies a &lt;strong&gt;charset&lt;/strong&gt; attribute, those body bytes can immediately be interpreted as text using the specified character encoding. However, if a charset declaration is &lt;em&gt;not&lt;/em&gt; present, the browser must begin scanning the bytes of the response body, checking for a Unicode Byte-Order-Marker at the top or scanning for a META HTTP-EQUIV element that specifies the &lt;strong&gt;charset&lt;/strong&gt;. When such a declaration is reached, the parser may need to restart in order to ensure that the bytes previously read were interpreted properly. When a restart occurs, the F12 Developer Tools will show the following note in the console:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0116.image_5F00_462149DD.png" width="423" height="59" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This restart can impact performance, as we&amp;rsquo;ll discuss momentarily.&lt;/p&gt;
&lt;p&gt;If a character set declaration is not found, the browser is forced to &amp;ldquo;Autodetect&amp;rdquo; the content-encoding based on the nature of the bytes read or other factors, potentially resulting in a mismatch between the web developer&amp;rsquo;s intent and the browser&amp;rsquo;s guess. That mismatch can result in a broken page, or a page which contains gibberish in some places. Therefore, for functionality and performance reasons, it is a best-practice to specify the encoding&lt;sup&gt;[1] &lt;/sup&gt; using HTTP response headers. If you must specify the character set using a META tag for some reason, it is critical that the META tag is the &lt;span style="text-decoration: underline;"&gt;first&lt;/span&gt; element in the HEAD.&lt;/p&gt;
&lt;p&gt;Internet Explorer 8 and later versions allow page authors to specify which document mode should be used for the rendering of the page, in order to enable a site to suggest that later versions of IE should render a given page in a legacy mode for compatibility reasons. Because the document mode can impact how the browser parses a page, Internet Explorer will need to restart the parsing process if a META element is found that specifies an X-UA-Compatible value different than was originally used to start parsing. The F12 Developer tools will note when a restart was needed:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3377.image_5F00_4CD45360.png" width="469" height="62" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For that reason, it is a best-practice to specify any X-UA-Compatible value as a HTTP response header. If you must specify the X-UA-Compatible value using a META tag for some reason, this element MUST appear before any script blocks and SHOULD appear as early in the HEAD element as possible. In some cases, a specified X-UA-Compatible META tag can be ignored (e.g. because the document mode was already finalized due to earlier markup&lt;sup&gt;[2]&lt;/sup&gt;). When this happens, the F12 Developer Tools&amp;rsquo; console will show the following message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4848.image_5F00_45B516E8.png" width="714" height="61" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The BASE element controls how any relative URLs in your page are made absolute in order to retrieve the specified resources from the network. Ordinarily, a relative URL is combined with the URL of a page in order to make it absolute. However, when a BASE tag is present, the specified HREF is used for URL-combination, and the page&amp;rsquo;s URL is not used. Because the BASE element impacts the combination of all relative URLs in a page, it MUST appear before any relative URLs in your page. &lt;a href="http://blogs.msdn.com/b/ie/archive/2005/08/29/457667.aspx"&gt;As of IE7, the BASE&amp;nbsp;element MUST appear within the HEAD&lt;/a&gt; element and will be ignored if it appears in the body. While it is &lt;em&gt;technically &lt;/em&gt;possible to use JavaScript (e.g. via document.write) to specify a BASE element, doing so is &lt;strong&gt;strongly&lt;/strong&gt; discouraged.&lt;/p&gt;
&lt;p&gt;After you&amp;rsquo;ve specified any of the charset, X-UA-Compatible, and BASE declarations you need, finish out your HEAD tag with a TITLE element and any other markup.&lt;/p&gt;
&lt;h3&gt;Understanding the Lookahead Pre-parser&lt;/h3&gt;
&lt;p&gt;To reduce the delay inherent in downloading script, stylesheets, images, and other resources referenced in an HTML page, Internet Explorer needs to request the download of those resources as early as possible in the loading of the page. The key problem is that the browser&amp;rsquo;s parser must pause when it encounters a non-async/non-defer script element, in order to run the script in order, as required by the standards. In the absence of mitigations, this pause would result in a significant delay in the parsing of the rest of the page, and thus result in resources being requested from the network much later.&lt;/p&gt;
&lt;p&gt;To mitigate this issue when loading a page, Internet Explorer runs a second instance of a parser whose job is to hunt for resources to download while the main parser is paused. This mode is called the &lt;strong&gt;lookahead pre-parser&lt;/strong&gt;&lt;sup&gt;[3] &lt;/sup&gt; because it looks ahead of the main parser for resources referenced in later markup. The download requests triggered by the lookahead are called &amp;ldquo;&lt;em&gt;speculative&lt;/em&gt;&amp;rdquo; because it is possible (not &lt;em&gt;likely&lt;/em&gt;, but &lt;em&gt;possible&lt;/em&gt;) that the script run by the main parser will change the meaning of the subsequent markup (for instance, it might adjust the BASE against which relative URLs are combined) and result in the speculative request being wasted.&lt;/p&gt;
&lt;p&gt;Critically, when the parser is forced to incur a document mode or charset restart, IE aborts all of that page&amp;rsquo;s in-flight requests and begins parsing of the page anew, again looking for resources to speculatively download. Beyond the CPU cost of these restarts, there can be a network cost as well.&lt;/p&gt;
&lt;p&gt;For instance, consider a page that restarts from IE9 Standards mode to Quirks Mode. The F12 console shows the restart:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8171.image_5F00_259A0A2B.png" width="467" height="59" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip;and you can see the aborted speculative requests listed in the Network tab of the F12 Developer Tools:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0652.image_5F00_5791AAB5.png" width="592" height="281" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because the restart occurs very early on in page load, only the first speculative request actually made it through URLMon and WinINET and was requested from the network.&lt;/p&gt;
&lt;p&gt;In &lt;a href="http://www.fiddler2.com/"&gt;Fiddler&lt;/a&gt;, you can see the aborted request for &lt;span style="font-family: Courier New;" face="Courier New"&gt;/1.js&lt;/span&gt;. The &lt;a href="http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx"&gt;Reason&lt;/a&gt; column shows that the first request was from the original &lt;strong&gt;html lookahead tokenizer&lt;/strong&gt; while the subsequent (successful) downloads were triggered by the &lt;strong&gt;&lt;em&gt;restarted&lt;/em&gt; html lookahead tokenizer&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6712.image_5F00_6563F0B0.png" width="722" height="183" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because the browser aborted the first request for the script file, it didn&amp;rsquo;t read the entire response from the network; instead it issued a TCP RST on the request&amp;rsquo;s connection, immediately closing it. When the restarted lookahead identified the same resource to download, it required the establishment of a &lt;em&gt;new &lt;/em&gt;TCP/IP connection.&lt;/p&gt;
&lt;p&gt;For best performance, specify your page&amp;rsquo;s character set and X-UA-Compatible (if desired) using HTTP response headers, helping the browser avoid expensive restarts.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;[1] &lt;/sup&gt;In case you&amp;rsquo;re wondering, &lt;a href="http://en.wikipedia.org/wiki/Utf-8"&gt;UTF-8 encoding&lt;/a&gt; is the best choice. For web content, UTF-8 is almost always more&amp;nbsp;efficient than UTF-16, and there are some peculiarities with UTF-16 support that make it inadvisable for use in web content.&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;[2] &lt;/sup&gt;Internet Explorer 10 PPB2 introduced a new architecture where a &lt;strong&gt;versioning pre-scan&lt;/strong&gt; occurs before the parsers begin their work; the X-UA-Compatible META tag must appear in the first 4kb of the markup or it will be ignored.&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;[3] &lt;/sup&gt; Regular readers may recall that I&amp;rsquo;ve written about Internet Explorer&amp;rsquo;s &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/07/27/bugs-in-the-ie8-lookahead-downloader.aspx"&gt;Lookahead downloading &lt;/a&gt;feature previously.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10187650" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Best_2D00_Practices/">Best-Practices</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/performance/">performance</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/parser/">parser</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/webdev/">webdev</category></item><item><title>Understanding Protocols</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/07/14/url-protocols-application-protocols-and-asynchronous-pluggable-protocols-oh-my.aspx</link><pubDate>Thu, 14 Jul 2011 01:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10186320</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10186320</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/07/14/url-protocols-application-protocols-and-asynchronous-pluggable-protocols-oh-my.aspx#comments</comments><description>&lt;p&gt;For over a decade, Internet Explorer has enabled developers to extend the browser with new URL protocol schemes. These protocols can be one of two types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa767916(v=vs.85).aspx#About_Asynchronous_P"&gt;Asynchronous Pluggable Protocols&lt;/a&gt;&lt;/strong&gt; - COM objects that implement the &lt;a href="http://msdn.microsoft.com/en-us/library/aa767859(v=VS.85).aspx"&gt;IInternetProtocolRoot&lt;/a&gt; interface and return content to URLMon, usually for rendering content &lt;em&gt;inside &lt;/em&gt;of Internet Explorer or Web Browser controls&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx"&gt;Application Protocols&lt;/a&gt;&lt;/strong&gt; - launch a program outside of Internet Explorer when invoked.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In today&amp;rsquo;s post, I&amp;rsquo;ll explain the difference between these two protocol types, and share what I&amp;rsquo;ve learned about them over the years.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Asynchronous Pluggable Protocols&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Pluggable Protocols include the &lt;strong&gt;http&lt;/strong&gt;, &lt;strong&gt;https&lt;/strong&gt;, &lt;strong&gt;ftp&lt;/strong&gt;, and &lt;strong&gt;file&lt;/strong&gt; protocols, and many less-common ones. This type of protocol can be registered at runtime by a browser extension, but most &amp;ldquo;permanent&amp;rdquo; protocols are registered inside the &lt;strong&gt;HKCR\Protocols\Handler&lt;/strong&gt; registry key, as you can see in the screenshot below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8284.image_5F00_4D3CCE8A.png" width="709" height="284" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When Internet Explorer (or the web browser control) encounters a URL whose protocol scheme is registered in this key, URLMon will create the COM object specified, pass in the URL provided, and begin to read data from the protocol handler object. Because support for Pluggable Protocols is implemented by URLMon, typically only IE-derived browsers (e.g. IE, Maxthon, etc) are able to load Pluggable Protocols. Other browsers offer &lt;a href="http://www.codeproject.com/KB/IP/FirefoxProtocol.aspx"&gt;similar proprietary mechanisms&lt;/a&gt; for implementing custom protocols.&lt;/p&gt;
&lt;p&gt;Writing an Asynchronous Pluggable Protocol is an extremely challenging exercise &amp;ndash; beyond being complex to implement, they are very often the target of hackers. That&amp;rsquo;s because permanently registered protocols can be freely invoked by any webpage and malicious input (e.g. a malformed or over-long URL) can be passed into the implementation of the &lt;a href="http://msdn.microsoft.com/en-us/library/aa767863(v=VS.85).aspx"&gt;Start&lt;/a&gt; method. In some cases, cross-site scripting (XSS), script-injection, or cross-site request forgery (CSRF) attacks can be conducted against these protocols. Because the browser accesses Pluggable Protocols asynchronously, and using multiple threads, and navigations can abort downloads at any time, object lifetime issues are prevalent. The IE team &lt;em&gt;often &lt;/em&gt;first learns about a new Pluggable Protocol when we see a flood of crashes reported to Watson or learn about active exploits of vulnerable protocols by bad guys.&lt;/p&gt;
&lt;p&gt;Developing an Pluggable Protocol is far beyond the scope of this article, but if you want a quick look, check out this simple &lt;a href="http://www.codeproject.com/KB/IP/DataProtocol.aspx"&gt;Pluggable Protocol example&lt;/a&gt; on CodeProject&amp;mdash;it shows how you could implement support for Data URIs before &lt;a href="http://blogs.msdn.com/b/ie/archive/2008/08/26/ie8-performance.aspx"&gt;they were built into IE8&lt;/a&gt;. There&amp;rsquo;s a similar example written in C# which you can find &lt;a href="http://www.codeproject.com/KB/aspnet/AspxProtocol.aspx"&gt;here&lt;/a&gt;, with the caveat that you should &lt;strong&gt;never&lt;/strong&gt; try to develop &amp;ldquo;production quality&amp;rdquo; IE extensions (protocols, BHOs, ActiveX controls, toolbars, etc) in .NET because of the performance and &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/08/21/agcore-addon-hangs-internet-explorer.aspx"&gt;stability problems&lt;/a&gt; that inevitably result.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Application Protocols&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In contrast to Pluggable Protocols, Application Protocols are much simpler. Rather than returning content to the browser, they simply enable the browser (or another program like a word processor or PDF reader) to &lt;em&gt;launch&lt;/em&gt; a program, passing the requested URL to that program. Common examples of Application Protocols include the &lt;a href="mailto:someone@example.com"&gt;mailto:&lt;/a&gt;&lt;sup&gt;[1]&lt;/sup&gt;&amp;nbsp;&lt;a href="news://"&gt;news:&lt;/a&gt;, and &lt;a href="onenote://nosuchplace/"&gt;onenote:&lt;/a&gt; protocols.&lt;/p&gt;
&lt;p&gt;Application Protocols are conceptually simple&amp;mdash;a protocol scheme (e.g. &lt;strong&gt;onenote&lt;/strong&gt;:) is associated in the registry with a locally installed application (e.g. &lt;strong&gt;onenote.exe&lt;/strong&gt;). The association is created by adding a new REG_SZ named &lt;strong&gt;URL Protocol &lt;/strong&gt;inside the key HKCR\&amp;lt;&lt;em&gt;&lt;span style="color: #ff0000;" color="#ff0000"&gt;protocolscheme&lt;/span&gt;&lt;/em&gt;&amp;gt;\.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0882.image_5F00_01DD2AC6.png" width="549" height="199" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The invoked URL is injected to replace the&lt;strong&gt; %1&lt;/strong&gt; parameter in the registered \Shell\Open\Command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p align="left"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4604.image_5F00_25965260.png" width="719" height="163" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks to their simplicity, and to the fact that the Windows &lt;a href="http://msdn.microsoft.com/en-us/library/bb762154(v=vs.85).aspx"&gt;ShellExecuteEx&lt;/a&gt; function can easily be used to launch such protocols, all major Windows web browsers (IE, Firefox, Chrome, Safari, Opera) support Application Protocols. However, there are some important differences in behavior between browsers.&lt;/p&gt;
&lt;p&gt;The first thing to understand is that despite their simplicity, Application Protocols have nevertheless been the source of a large number of vulnerabilities over the years, and thus nearly all browsers (except Safari) will prompt the user before launching the specified program.&lt;/p&gt;
&lt;p&gt;Internet Explorer 8+ (and&amp;nbsp;Web Browser Controls&amp;nbsp;that opt-in to &lt;a href="http://msdn.microsoft.com/en-us/library/ee330729(v=vs.85).aspx"&gt;FEATURE_SHOW_APP_PROTOCOL_WARN_DIALOG&lt;/a&gt;)&amp;nbsp;will show the following prompt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Application Protocol Prompt" border="0" alt="Application Protocol Prompt" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5265.AppProtPrompt_5F00_4C6468A0.png" width="445" height="334" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The user may control whether this prompt appears by unticking the &lt;strong&gt;Always ask before opening this type of address &lt;/strong&gt;box; the decision is stored inside a REG_DWORD named &lt;strong&gt;WarnOnOpen &lt;/strong&gt;inside &lt;strong&gt;HKCU\SOFTWARE\Microsoft\Internet Explorer\ProtocolExecute\&lt;/strong&gt;; the default value is &lt;strong&gt;0x1&lt;/strong&gt;, which enables the warning, and the value &lt;strong&gt;0x0 &lt;/strong&gt;disables the warning. The HKLM version of this key is also respected in the event that the administrator or application developer has set the policy on the user&amp;rsquo;s behalf, but for security reasons suppressing this prompt is generally discouraged.&lt;/p&gt;
&lt;p&gt;Other browsers show similar prompts, which you can see here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Chrome" border="0" alt="Chrome" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8802.image_5F00_5A36AE9B.png" width="470" height="310" /&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Firefox" border="0" alt="Firefox" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7824.image_5F00_0104C4DC.png" width="353" height="373" /&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Opera" border="0" alt="Opera" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8875.image_5F00_79E58863.png" width="429" height="174" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In Internet Explorer 7 and later on Windows Vista and later, launching an application to handle an Application Protocol URL will also consult the Protected Mode Elevation policy for the target executable. By default, this policy is that the user will be prompted for permission to launch the program at the Medium Integrity Level:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="AppProtElevationPrompt" border="0" alt="AppProtElevationPrompt" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/2313.AppProtElevationPrompt_5F00_thumb_5F00_1994622C.png" width="503" height="325" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can learn more about Protected Mode Elevation policy by reading my &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/12/01/understanding-internet-explorer-security-protected-mode-elevation-dialog.aspx"&gt;previous blog post&lt;/a&gt; on that topic.&lt;/p&gt;
&lt;p&gt;Many vulnerabilities in Application Protocols stem from the fact that developers often try to quickly &amp;ldquo;bolt on&amp;rdquo; support for this feature into their existing programs. This is frequently a source of security bugs because many programs are not written with the expectation that untrusted data (e.g. the web-supplied URL) will be passed in on their command line. Vulnerable programs often have simple logic bugs (e.g. buffer-overflowing because they fail to handle command line arguments larger than some fixed size) but some have more complicated problems. For instance, some programs will immediately undertake a permanent configuration change without first confirming it with the user. For example, one buggy implementation I once saw would immediately delete user data when passed a particular command line argument&amp;mdash;the command to do so existed for many years before a later developer came in and quickly added the code to expose the program as an Application Protocol handler without performing an analysis of the threats posed by untrusted arguments.&lt;/p&gt;
&lt;p&gt;Another behavior to be aware of is that some callers will decode or encode URLs before passing them along to the target program. For historical reasons, Internet Explorer performs a single percent-decoding pass on the URL before calling ShellExecute; by default IE9 and IE10 still perform this decoding &lt;em&gt;unless&lt;/em&gt; the protocol&amp;rsquo;s registry key contains a REG_DWORD named &lt;strong&gt;UseOriginalUrlEncoding&lt;/strong&gt; with value &lt;strong&gt;0x1&lt;/strong&gt;. However, the Windows Shell&amp;rsquo;s Start &amp;gt; Run command performs no such decoding pass.&lt;/p&gt;
&lt;p&gt;The following image shows the behavior in four different scenarios when invoking the URL &lt;strong&gt;alert:Escaped%22Quoted%22and"UnescapedQuoted"&lt;/strong&gt; to launch a trivial program.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Six scenarios, four different results" border="0" alt="Screenshot of differences" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/2045.image_5F00_127525B4.png" width="703" height="344" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Detecting Installed Protocols&lt;/h3&gt;
&lt;p&gt;Web developers often ask if there&amp;rsquo;s some way to detect whether the client has a given protocol available. Generally, the answer is no, this isn&amp;rsquo;t possible. In IE, if a page attempts to navigate to a protocol which is not registered, the user will see the following notification page:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3580.image_5F00_thumb_5F00_3223FF7C.png" width="644" height="303" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Opera and Safari show a similar page, while Firefox shows a modal error alert, and Chrome will simply fail the navigation. Only Firefox fires an OnError event when a navigation is attempted to an unregistered protocol.&lt;/p&gt;
&lt;p&gt;Unfortunately, that means that there is no cross-browser, standardized method to detect whether the user&amp;rsquo;s browser can invoke a particular protocol. In the past, some setup programs would try to &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/10/08/extending-the-user-agent-string-problems-and-alternatives.aspx"&gt;inject a token into the user&amp;rsquo;s User-Agent string&lt;/a&gt; or add a Version Vector (see the same article) that a web page can detect. Alternatively, some packages include both a protocol &lt;em&gt;and &lt;/em&gt;and ActiveX control&amp;mdash;the ActiveX control only exists to enable the web page to infer whether or not the Application Protocol is installed. All three of these methods have significant downsides, and none of the three approaches will work in non-IE browsers.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;[1] &lt;/sup&gt;Technically speaking, IE includes some special-case code for mailto that makes it behave a little differently than most Application Protocols. But it&amp;rsquo;s pretty close.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10186320" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Best_2D00_Practices/">Best-Practices</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/limitations/">limitations</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/weboc/">weboc</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/UAC/">UAC</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/add_2D00_ons/">add-ons</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/interop/">interop</category></item><item><title>Integrated Windows Authentication</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/07/06/integrated-windows-authentication-kerberos-ntlm-http-400-error-for-16kb-authorization-header.aspx</link><pubDate>Wed, 06 Jul 2011 20:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10183740</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10183740</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/07/06/integrated-windows-authentication-kerberos-ntlm-http-400-error-for-16kb-authorization-header.aspx#comments</comments><description>&lt;p&gt;Inside Internet Explorer&amp;rsquo;s Tools &amp;gt; Internet Options &amp;gt; Advanced dialog, there&amp;rsquo;s an option named &lt;strong&gt;Enable Integrated Windows Authentication&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4336.image_5F00_144975F7.png" width="395" height="93" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This preference is stored using a REG_DWORD named &lt;strong&gt;EnableNegotiate &lt;/strong&gt;inside &lt;strong&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings&lt;/strong&gt;. When set to 0x1, Negotiate is enabled.&lt;/p&gt;
&lt;p&gt;From time to time, users have asked what this option does and why they&amp;rsquo;d ever want to adjust it. The answer is that the Integrated Windows Authentication (IWA) option controls whether Internet Explorer (and applications based on WinINET) will use the &lt;strong&gt;Negotiate &lt;/strong&gt;authentication protocol to respond to HTTP/401 challenges from servers. At a high-level, Negotiate is a &amp;ldquo;wrapper&amp;rdquo; around the &lt;a href="http://en.wikipedia.org/wiki/Kerberos_(protocol)"&gt;Kerberos&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/aa378749(v=vs.85).aspx"&gt;NTLM&lt;/a&gt; authentication protocols. If Kerberos can be used, it will be, otherwise the Negotiate protocol will use NTLM. If you disable the IWA protocol, then a HTTP/401 challenge which only offers Negotiate will be treated as &amp;ldquo;final&amp;rdquo; and the client will refuse to authenticate.&lt;/p&gt;
&lt;p&gt;Most servers are configured to return a challenge which offers &lt;em&gt;both &lt;/em&gt;Negotiate and &amp;ldquo;unwrapped&amp;rdquo; NTLM, such that if the user has disabled Negotiate by unticking the IWA checkbox, the client will still be able to authenticate using the NTLM protocol:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5807.image_5F00_6D0F2CC1.png"&gt;&lt;img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8358.image_5F00_thumb_5F00_7AE172BC.png" width="238" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fiddler&amp;rsquo;s &lt;strong&gt;Auth &lt;/strong&gt;inspector tabs will show you what authentication protocol is in use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7853.image_5F00_2CD91347.png" width="509" height="74" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip;and when NTLM is in use, it will even break down the authentication blobs into a textual explanation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8446.image_5F00_338C1CCA.png" width="501" height="317" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;IWA is enabled by default and generally should be left that way. However, for troubleshooting purposes, it is sometimes useful to disable the option (don&amp;rsquo;t forget to restart all IE instances) to see whether a given authentication problem may be related to the use of Kerberos.&lt;/p&gt;
&lt;p&gt;For instance, some users have encountered problems where a given server returns a &lt;strong&gt;HTTP/400&lt;/strong&gt; error when IWA is enabled:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Courier New;" color="#0000ff" face="Courier New"&gt;HTTP/1.1 400 Bad Request &lt;br /&gt;Content-Type: text/html; charset=us-ascii &lt;br /&gt;Server: Microsoft-HTTPAPI/2.0 &lt;br /&gt;Date: Wed, 06 Jul 2011 20:48:07 GMT &lt;br /&gt;Connection: close &lt;br /&gt;Content-Length: 346&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Courier New;" color="#0000ff" face="Courier New"&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""&lt;/span&gt;&lt;a href="http://www.w3.org/TR/html4/strict.dtd&amp;quot;"&gt;&lt;span style="color: #0000ff; font-family: Courier New;" color="#0000ff" face="Courier New"&gt;http://www.w3.org/TR/html4/strict.dtd"&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #0000ff; font-family: Courier New;" color="#0000ff" face="Courier New"&gt;&amp;gt; &lt;br /&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad Request&amp;lt;/TITLE&amp;gt; &lt;br /&gt;&amp;lt;META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"&amp;gt;&amp;lt;/HEAD&amp;gt; &lt;br /&gt;&amp;lt;BODY&amp;gt;&amp;lt;h2&amp;gt;Bad Request - Request Too Long&amp;lt;/h2&amp;gt; &lt;br /&gt;&amp;lt;hr&amp;gt;&amp;lt;p&amp;gt;HTTP Error 400. The size of the request headers is too long.&amp;lt;/p&amp;gt; &lt;br /&gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If IWA is disabled, then NTLM is used and the request succeeds. The problem in this case is that many IIS servers are configured to refuse HTTP requests that contain more than 16kb of header information. A Negotiate authentication string contains a base-64-encoded Kerberos ticket which includes a list of all of the security groups to which the current user belongs. In some environments this list can grow quite large and hence the client&amp;rsquo;s &lt;strong&gt;Authorization &lt;/strong&gt;header alone exceeds the 16kb limit. When IWA is disabled, NTLM is used instead and the smaller Authorization token does not exceed the configured limit.&lt;/p&gt;
&lt;p&gt;A member of the IIS Team wrote &lt;a title="http://blogs.iis.net/thomad/archive/2009/10/23/kerberos-authentication-issues.aspx" href="http://blogs.iis.net/thomad/archive/2009/10/23/kerberos-authentication-issues.aspx"&gt;a blog&lt;/a&gt; further explaining this issue, including steps to see how many groups you belong to. IIS servers can be &lt;a href="http://support.microsoft.com/kb/970875"&gt;configured to allow larger HTTP requests&lt;/a&gt;, which works around this problem without reconfiguring the client or trimming the user&amp;rsquo;s group memberships. Servers can also be reconfigured to &lt;a href="http://support.microsoft.com/?id=917557"&gt;permit connection-based Negotiate authentication&lt;/a&gt; which lowers the performance impact of sending large Kerberos tickets on every request. You can also read this &lt;a href="http://support.microsoft.com/kb/2020943"&gt;KB&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10183740" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/performance/">performance</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/limitations/">limitations</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/fixes/">fixes</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/problems/">problems</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/wininet/">wininet</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/fiddler/">fiddler</category></item><item><title>The Perils of User-Agent Sniffing, 2011 Edition</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx</link><pubDate>Thu, 30 Jun 2011 01:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10181683</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10181683</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx#comments</comments><description>&lt;p&gt;I continue to be amazed at how often site-compatibility issues turn out to have a root cause related to User-Agent sniffing.&lt;/p&gt;
&lt;p&gt;For instance, earlier this year, someone wrote into the &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/03/14/internet-explorer-hidden-images-styled-with-display-none-always-have-zero-0-height.aspx"&gt;comments section on one of my posts&lt;/a&gt; noting that the HTML5 canvas art site &lt;a href="http://weavesilk.com/"&gt;WeaveSilk.com&lt;/a&gt; wasn&amp;rsquo;t working in IE9. After reading through thousands of lines of JavaScript, including various libraries, I found the culprit at the &lt;em&gt;very end&lt;/em&gt; of the page, which you can see here, along with the very simple fix:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6012.image_5F00_17223BED.png" width="663" height="72" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Simply put, if the browser&amp;rsquo;s UA string contained &amp;ldquo;MSIE&amp;rdquo;, the site skipped all of its initialization code. Oops.&lt;/p&gt;
&lt;p&gt;Today, I encountered two more issues of this class of problem. One is with the &lt;a href="http://www.google.com/webfonts/v2"&gt;Google Fonts&lt;/a&gt; site. By default, if you load this site, you&amp;rsquo;ll find that it&amp;rsquo;s blank and contains no content:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0245.image_5F00_56EC2272.png" width="507" height="255" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A quick peek in Fiddler shows that the problem is that the server is returning HTML pages with an &amp;ldquo;Your browser is unsupported&amp;rdquo; message when IE attempts to download the CSS and JS for the page.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3463.image_5F00_36D115B5.png" width="712" height="131" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you use the F12 Developer Tools or Fiddler to change the User-Agent string, then the site returns correct content and the page loads correctly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8662.image_5F00_16B608F8.png" width="309" height="214" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because the Google.com domain is on the Compatibility View list, the site is in IE8 Browser Mode by default. You can see this on a Google page by pressing F12 to see the Developer tools; the Browser Mode is IE8: &lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7266.image_5F00_24884EF3.png" width="106" height="23" /&gt;. While the page itself can select a later Document Mode using an &lt;a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx"&gt;X-UA-Compatible meta tag&lt;/a&gt;, the User-Agent string is selected by the &lt;strong&gt;Browser Mode&lt;/strong&gt;, not the &lt;strong&gt;Document Mode&lt;/strong&gt;. The distinction between these two modes is often misunderstood&amp;mdash;there&amp;rsquo;s a great MSDN Article which explains the &lt;a href="http://msdn.microsoft.com/en-us/library/dd565628(VS.85).aspx#bdmodes"&gt;difference between the Browser Mode and Document Mode&lt;/a&gt; settings.&lt;/p&gt;
&lt;p&gt;The second UA-string issue I encountered today was closer to home. Eagle-eyed viewers of the &lt;a href="http://media.ch9.ms/ch9/50dc/147179d0-7207-48d5-8560-9f10015550dc/IE10PP2Ari2_high_ch9.mp4"&gt;high-resolution video&lt;/a&gt; included in the &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/06/29/site-ready-html5-second-ie10-platform-preview-available-for-developers.aspx"&gt;blog post announcing the IE10 Platform Preview 2&lt;/a&gt; might have observed that the text in the &lt;a href="http://ie.microsoft.com/testdrive/Performance/Fireflies/Default.html"&gt;Fireflies demo&lt;/a&gt; page claims that the Platform Preview is &amp;ldquo;Internet Explorer 7&amp;rdquo; while the status bar clearly indicates that it&amp;rsquo;s an IE10 Platform Preview build running in IE10 document mode:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3465.clip_5F00_image002_5F00_567FEF7D.jpg" width="488" height="118" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you look at the source of the demo site, you&amp;rsquo;ll notice that FeatureDetection.js includes the following code (typos and all):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3060.image_5F00_64523578.png" width="446" height="81" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The code isn&amp;rsquo;t looking for the &lt;strong&gt;Trident/6.0&lt;/strong&gt; token sent in the &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx"&gt;IE10 User-Agent string&lt;/a&gt; and hence doesn&amp;rsquo;t realize that this PPB has loaded the site with&lt;strong&gt; Browser Mode:&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;Internet Explorer 10 Compatibility View&lt;/strong&gt;. The page itself is running in &lt;strong&gt;IE10 Document Mode&lt;/strong&gt; because it includes the following META tag:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because the page is properly running in IE10 Document Mode, the markup (including the CANVAS element) continues to work correctly, but the &amp;ldquo;What browser are you using&amp;rdquo; notice at the bottom left is misleading.&lt;/p&gt;
&lt;p&gt;You might be wondering why the video indicates that the page was loaded in Browser Mode: IE10 Compatibility View. The answer is simple-- when the video was recorded, the new Fireflies demo hadn't yet been published. We were using the PPB to load a mirror copy of the demo from an internal staging server on our Intranet. By default, Internet Explorer runs Intranet pages in Compatibility View.&lt;/p&gt;
&lt;p&gt;Now, when &lt;em&gt;you &lt;/em&gt;visit the IETestDrive site, you should see a proper browser identifier because the browser will be in IE10 Browser Mode:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4540.image_5F00_443728BB.png" width="482" height="82" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10181683" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/problems/">problems</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/troubleshooting/">troubleshooting</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ie9/">ie9</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/interop/">interop</category></item><item><title>Update now available for improved font-smoothing</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/06/29/ie9-cleartype-improved-clarity-for-tahoma-verdana-and-arial-fonts-fuzzy-blurry.aspx</link><pubDate>Wed, 29 Jun 2011 03:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10181194</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10181194</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/06/29/ie9-cleartype-improved-clarity-for-tahoma-verdana-and-arial-fonts-fuzzy-blurry.aspx#comments</comments><description>&lt;p&gt;Today&amp;rsquo;s batch of Windows Updates included a &amp;ldquo;Recommended&amp;rdquo; &lt;a href="http://support.microsoft.com/kb/2545698"&gt;update&lt;/a&gt; to improve the rendering of certain&amp;nbsp;fonts at small sizes (8-10pt). The updated versions of Arial, Verdana, and Tahoma fonts include new hinting logic that renders more clearly using sub-pixel-positioned ClearType text rendered using the DirectWrite APIs used by Internet Explorer 9's hardware-accelerated text rendering.&lt;/p&gt;
&lt;p&gt;I put together a simple test page for these changes here: &lt;a href="http://www.debugtheweb.com/test/ClearType/"&gt;http://www.debugtheweb.com/test/ClearType/&lt;/a&gt;. Using the comparison widget, you can see that Arial's &lt;strong&gt;c&lt;/strong&gt; gets a little wider, dots on &lt;strong&gt;i&lt;/strong&gt; and &lt;strong&gt;j&lt;/strong&gt; get a little bolder, 10pt Verdana's &lt;strong&gt;5 &lt;/strong&gt;changes a bit, 10pt Arial's &lt;strong&gt;0 &lt;/strong&gt;gets a bit skinnier, and many of 9pt Verdana's characters gain a bit of weight.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;
&lt;p&gt;PS: The Firefox guys &lt;a href="http://blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/"&gt;wrote a bit more&lt;/a&gt; about this as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10181194" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/tweaks/">tweaks</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ie9/">ie9</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/IEUpdate/">IEUpdate</category></item><item><title>Understanding Once-Per-Session Cache Validation</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/06/15/once-per-session-cache-syncmode-revalidates-resources-every-time-i-start-internet-explorer.aspx</link><pubDate>Wed, 15 Jun 2011 01:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10174617</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10174617</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/06/15/once-per-session-cache-syncmode-revalidates-resources-every-time-i-start-internet-explorer.aspx#comments</comments><description>&lt;p&gt;Last year, I wrote about the &lt;a href="http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx"&gt;IE9 improvements in heuristic expiration&lt;/a&gt;, which apply when a server fails to specify how long a cached resource should be treated as fresh. Heuristic Expiration works by calculating an &lt;em&gt;implicit freshness lifetime&lt;/em&gt; from the&amp;nbsp;Last-Modified timestamp on the cached resource and the timestamp at which the resource was downloaded from the server. &lt;/p&gt;
&lt;p&gt;However, the Heuristic Expiration calculation only applies when the user&amp;rsquo;s &lt;strong&gt;Check for newer versions of stored pages &lt;/strong&gt;option (a.k.a. "&lt;em&gt;SyncMode&lt;/em&gt;")&amp;nbsp;inside &lt;strong&gt;Tools &amp;gt; Internet Options &amp;gt; Browsing History Settings&lt;/strong&gt; is set to &lt;strong&gt;Automatically.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6153.image_5F00_39661103.png"&gt;&lt;img height="98" width="226" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0537.image_5F00_thumb_5F00_0B0C8B56.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As mentioned, the heuristic expiration feature relies upon the server providing a &lt;strong&gt;Last-Modified&lt;/strong&gt; timestamp on the response. If the server fails to provide such a timestamp, then Internet Explorer will fall back to its &lt;strong&gt;Once-Per-Session&lt;/strong&gt; syncmode for that resource.&amp;nbsp;A user may elect to use Once-Per-Session syncmode (for all resources) in lieu of Heuristic Expiration by selecting the &lt;strong&gt;Every time I start Internet Explorer&lt;/strong&gt; radio button.&lt;/p&gt;
&lt;p&gt;WinINET keeps track of when the current process has started in a variable called &lt;strong&gt;SessionStartTime&lt;/strong&gt;. Every entry in the WinINET cache has a &lt;a href="http://msdn.microsoft.com/en-us/library/aa385134(v=vs.85).aspx"&gt;LastSyncTime&lt;/a&gt;. If the cache syncmode is Once-Per-Session, when WinINET is deciding whether or not to reuse a resource of unknown freshness, it compares the resource&amp;rsquo;s LastSyncTime to the process&amp;rsquo; SessionStartTime. If the LastSyncTime is earlier than the SessionStartTime, WinINET will not immediately reuse the cached version and will instead make a network request to the server to check for freshness, potentially downloading an updated version of the resource in the process. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Once-Per-Session &lt;/strong&gt;syncmode has a few non-obvious subtleties. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To establish an upper-bound on reuse, WinINET will also perform revalidation if the current time is more than 12 hours after the LastSyncTime. &lt;/li&gt;
&lt;li&gt;In any version of IE, if a page&amp;rsquo;s JavaScript executes the &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2010/04/05/understanding-browser-session-lifetime.aspx"&gt;ClearAuthenticationCache&lt;/a&gt; command, that invokes the &lt;a href="http://msdn.microsoft.com/en-us/library/aa385328(v=vs.85).aspx"&gt;INTERNET_OPTION_END_BROWSER_SESSION&lt;/a&gt; operation in WinINET. Internally, the EndBrowserSession option (among many other operations) invokes the INTERNET_OPTION_RESET_URLCACHE_SESSION operation, which sets the current process&amp;rsquo; SessionStartTime to the current time. So, if any page invokes this API, any &amp;ldquo;Once per session&amp;rdquo; resources will be revalidated before being reused by the current process. &lt;/li&gt;
&lt;li&gt;If &lt;a href="http://msdn.microsoft.com/en-us/library/aa383661(v=vs.85).aspx"&gt;INTERNET_FLAG_HYPERLINK&lt;/a&gt; is present on the request, and a cached response doesn&amp;rsquo;t have a &lt;strong&gt;Last-Modified&lt;/strong&gt; value set, then WinINET will &lt;em&gt;always&lt;/em&gt; revalidate the cached resource before reuse, ignoring the Once-Per-Session rule. IE9 uses FLAG_HYPERLINK (via BINDF_HYPERLINK) when performing most document (e.g. top-level or frame) downloads. &lt;/li&gt;
&lt;li&gt;In Internet Explorer 8, simply opening a new tab (which &lt;a href="http://blogs.msdn.com/b/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx"&gt;creates a LCIE Tab process&lt;/a&gt;) would reset the SessionStartTime for all other tabs in the current &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2010/04/05/understanding-browser-session-lifetime.aspx"&gt;Browser Session&lt;/a&gt;. This behavior hurt performance, and was corrected in IE9. In IE9, every new tab process in a Browser Session will inherit the original SessionStartTime for the browser session, eliminating this performance penalty. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, what does this gobbledygook all mean to you, the web developer? &lt;strong&gt;Avoid the confusion and unpredictability of cache heuristics and specify an explicit expiration time!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10174617" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/performance/">performance</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/caching/">caching</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/http/">http</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ie8/">ie8</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/wininet/">wininet</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ie9/">ie9</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/BetterInIE9/">BetterInIE9</category></item><item><title>First IE9 Update Now Available</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/06/14/ie9.01-update-includes-download-manager-fix-for-99-percent-issue.aspx</link><pubDate>Tue, 14 Jun 2011 21:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10174562</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10174562</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/06/14/ie9.01-update-includes-download-manager-fix-for-99-percent-issue.aspx#comments</comments><description>&lt;p&gt;As announced over on &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/06/14/ie-9-0-1-available-via-windows-update.aspx"&gt;the IEBlog&lt;/a&gt;, the first update for IE9 is now available. When this update is installed, the IE Help &amp;gt; About screen will indicate that the IE version is 9.0.1. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="179" width="283" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0246.image_5F00_6D7CE07D.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Please note that this is a &lt;em&gt;display only&lt;/em&gt; change and it is &lt;strong&gt;not &lt;/strong&gt;reflected in the User-Agent String, Conditional Comments, or the version information returned by the getComponentVersion API.&lt;/p&gt;
&lt;p&gt;Beyond the usual batch of security and reliability fixes, this update contains two fixes for the IE9 download manager. First, it resolves an issue where the IE Download Manager would sometimes get &amp;ldquo;stuck&amp;rdquo; at 99% if the page that spawned a download was closed before the download completed. Second, it resolves an issue where under some circumstances, the &amp;ldquo;&lt;em&gt;This type of file could harm your computer&lt;/em&gt;&amp;rdquo; notice was still shown even when the SmartScreen Application Reputation feature is enabled. There are a handful of other functionality fixes in this update as well, described in the very-slow-to-load &lt;a href="http://support.microsoft.com/kb/2530548"&gt;KB article&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: small;"&gt;&lt;span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;A webpage stops responding after you close a modal dialog box that is started by a VB6 ActiveX control in Internet Explorer 9&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;Memory leak when the window.createPopup method and the document.createStyleSheet method are used in Internet Explorer 7 or in Internet Explorer 8&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;Tasks may not be displayed in the Jump List of a pinned Internet Explorer 9 icon in Windows 7 or in Windows Server 2008 R2&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;You cannot edit a cell in a DHMTL grid after you delete the cell's contents in Windows Internet Explorer 8 on a computer that is running Windows Vista or Windows Server 2008&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10174562" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/fixes/">fixes</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/problems/">problems</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ie9/">ie9</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/BetterInIE9/">BetterInIE9</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/IEUpdate/">IEUpdate</category></item><item><title>Download Resumption in Internet Explorer</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/06/03/send-an-etag-to-enable-http-206-file-download-resume-without-restarting.aspx</link><pubDate>Fri, 03 Jun 2011 17:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10171184</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10171184</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/06/03/send-an-etag-to-enable-http-206-file-download-resume-without-restarting.aspx#comments</comments><description>&lt;p&gt;While most file downloads are quickly and successfully completed, some large downloads take a long time to complete, and may be interrupted in the middle by either the user choosing to &amp;ldquo;Pause&amp;rdquo; or due to networking glitches (e.g. WiFi connection dropped). &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="68" width="614" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/2318.image_5F00_thumb_5F00_1C995042.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;One of the significant enhancements in the IE9 Download Manager is enhanced support&lt;sup&gt;[1] &lt;/sup&gt;for download resumption. Download resumption enables users to resume the transfer of a file at the point of interruption instead of re-downloading the entire file over again. In order for Internet Explorer to consider a download to be resumable, several conditions must be met:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The URL must be HTTP or HTTPS&lt;/li&gt;
&lt;li&gt;The server must not have sent the response header &lt;strong&gt;Accept-Ranges: none&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The server must send a strong &lt;strong&gt;ETAG&lt;/strong&gt; header on the response&lt;/li&gt;
&lt;li&gt;The server must respect the &lt;strong&gt;Range &lt;/strong&gt;header on the subsequent download request&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Download resumption works by sending a HTTP Request specifying what version of the resource the client currently has (identified by the ETAG) and the range of the file that the client would like the server to send. For instance, here&amp;rsquo;s the request that is sent if the user clicks the &lt;strong&gt;Resume &lt;/strong&gt;button in the download manager:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console;"&gt;GET /BigFile.exe HTTP/1.1 &lt;br /&gt;Accept: */* &lt;br /&gt;Accept-Encoding: gzip, deflate &lt;br /&gt;User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) &lt;br /&gt;Host: 127.0.0.1 &lt;br /&gt;&lt;span style="color: #ff0000;"&gt;Range: bytes=700000- &lt;br /&gt;If-Range: "StrongETAG" &lt;br /&gt;&lt;/span&gt;Connection: Keep-Alive&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the server is capable of resuming the download, and the version identified by the client (using the If-Range header) is still available, the server will send a &lt;strong&gt;HTTP/206 &lt;/strong&gt;response with a &lt;strong&gt;Content-Range &lt;/strong&gt;header indicating the portion of the file that the server is sending. If the server is unable or unwilling to deliver the range requested by the client, it may send a &lt;strong&gt;HTTP/200 &lt;/strong&gt;response and start the download over from the beginning.&lt;/p&gt;
&lt;p&gt;In some cases, we&amp;rsquo;ve heard from users who do not understand why they cannot resume certain incomplete downloads. &lt;/p&gt;
&lt;p&gt;Some servers simply don&amp;rsquo;t allow download resumption, either forbidding it explicitly using &lt;strong&gt;Accept-Ranges: none&lt;/strong&gt; or implicitly by never returning a &lt;strong&gt;HTTP/206 &lt;/strong&gt;response. The advantage to explicitly sending &lt;strong&gt;Accept-Ranges: none &lt;/strong&gt;is that the Download Manager&amp;rsquo;s &lt;strong&gt;Pause &lt;/strong&gt;button is disabled, to spare the user from trying to pause a download only to find out later that they must restart it from the beginning. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="84" width="661" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6320.image_5F00_150DE0D5.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In many cases, the problem is that the server failed to specify an ETAG that allows the client to ensure that it is resuming the correct file&lt;sup&gt;[2][3]&lt;/sup&gt;. In a few cases, we&amp;rsquo;ve seen servers that send &amp;ldquo;weak&amp;rdquo; ETAGs; strong ETAGS &lt;strong&gt;must &lt;/strong&gt;begin and end with quotation marks. If the response lacks a strong ETAG, the Pause button is disabled.&lt;/p&gt;
&lt;p&gt;Even when a server otherwise supports resumption, in some cases, it will fail because the server requires some state information to allow the request (e.g. a Session cookie or HTTP Authentication) which is no longer available, because, for instance, the user closed and reopened the browser before attempting to resume. &lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&lt;sup&gt;[1] &lt;/sup&gt;IE8 and below could resume downloads under ideal circumstances, but in practice these circumstances were very rarely achieved.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;sup&gt;[2] &lt;/sup&gt;For instance, Download.com isn&amp;rsquo;t currently sending ETAGs on their file downloads.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;sup&gt;[3]&lt;/sup&gt; Sites that send &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx"&gt;Vary headers&lt;/a&gt; on their responses should also always send an ETAG on such responses to allow the browser to conditionally revalidate such responses.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10171184" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/http/">http</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/standards/">standards</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/networking/">networking</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/BetterInIE9/">BetterInIE9</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/downloads/">downloads</category></item><item><title>Consent and Browser Refreshes</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/25/popup-blocker-allow-button-triggers-page-refresh.aspx</link><pubDate>Wed, 25 May 2011 02:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10168064</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10168064</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/25/popup-blocker-allow-button-triggers-page-refresh.aspx#comments</comments><description>&lt;p&gt;Modern browser APIs like the &lt;a href="http://ie.microsoft.com/testdrive/HTML5/Geolocation/Default.html"&gt;GeoLocation API&lt;/a&gt; are designed to have an asynchronous consent experience, whereby the API simply will not undertake a privileged action until the user consents. Unfortunately, many browser features like popup windows and ActiveX controls were designed before privilege limitations were introduced, and many websites are designed with the expectation that the API will succeed immediately and synchronously.&lt;/p&gt;
&lt;p&gt;When features like the Popup Blocker, Per-Site ActiveX, ActiveX Filtering, or Tracking Protection block an action requiring consent, Internet Explorer will refresh the web page if the user grants permission (e.g. by clicking an Unblock or Allow button). The problem is that if the browser prevents anything (e.g. an ActiveX control or popup) from loading at the expected time, JavaScript that might have depended upon its presence may fail (perhaps spectacularly) and not automatically recover when the user unblocks the content and that content eventually becomes available. &lt;/p&gt;
&lt;p&gt;By refreshing the page after unblocking the content, Internet Explorer can limit the compatibility impact of the consent experience by ensuring that scripts and controls are loaded at their expected time when the page reloads. Unfortunately, this refresh can be disruptive, for instance, if you&amp;rsquo;ve entered data on the page, it may be lost when the browser refreshes. &lt;/p&gt;
&lt;p&gt;Web Applications can be designed to avoid consent experiences and ensure that if APIs are blocked, a script error does not result.&lt;/p&gt;
&lt;p&gt;For instance, the Outlook Web Access (OWA) team responds to popup blocking in a clever way. By default, popups are only permitted after a user-initiated action (click, Enter keypress, etc). OWA is designed such that most popups are the direct result of a user-initiated click and avoid the popup blocker automatically. However, some notifications may show at unexpected times and result in a block:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/1401.image_5F00_7129966C.png"&gt;&lt;img height="83" width="411" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4456.image_5F00_thumb_5F00_24F18CBE.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If OWA detects a popup was blocked (e.g. window.open returned null) then it shows the following HTML prompt. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="183" width="504" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3073.image_5F00_2BA49641.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When the user clicks on the &lt;strong&gt;Yes &lt;/strong&gt;button, this click is treated as a user-initiated action, and the popup window will be permitted. If the second attempt to open the popup fails, the web application knows that the user is in a non-standard configuration (e.g. &amp;ldquo;Block all popups&amp;rdquo;) and notifies the user:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="183" width="504" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5125.image_5F00_567CFA53.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the user clicks the &lt;strong&gt;Allow &lt;/strong&gt;button rather than interacting with the OWA prompt, Internet Explorer will attempt to refresh. OWA has an &lt;strong&gt;OnBeforeUnload &lt;/strong&gt;handler that warns the user that the Refresh will lose content: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="239" width="370" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7774.image_5F00_2F42B11E.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the user chooses to &lt;strong&gt;Stay on this page&lt;/strong&gt;, then the page refresh is skipped, and the mail message is preserved. &lt;/p&gt;
&lt;p&gt;In IE9, we&amp;rsquo;ve made an improvement so that the &amp;ldquo;Allow page to use popups&amp;rdquo; flag remains set on the &lt;em&gt;current &lt;/em&gt;markup despite the lack of refresh, so the next time a popup is invoked, permission is granted based on the user&amp;rsquo;s consent. [&lt;a href="http://www.debugtheweb.com/test/consent/PopupBlockerTimer.asp"&gt;Test Page&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;As a best practice, web applications should expect that privileged APIs with consent experiences may not immediately succeed.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10168064" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ActiveX/">ActiveX</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Best_2D00_Practices/">Best-Practices</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/webdev/">webdev</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/BetterInIE9/">BetterInIE9</category></item><item><title>Enhanced Mitigation Experience Toolkit Update</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/24/shielding-applications-and-browsers-with-the-enhanced-mitigation-experience-toolkit.aspx</link><pubDate>Tue, 24 May 2011 19:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10167944</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10167944</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/24/shielding-applications-and-browsers-with-the-enhanced-mitigation-experience-toolkit.aspx#comments</comments><description>&lt;p&gt;Microsoft&amp;rsquo;s Security Research and Defense team has released an updated version of their &lt;a href="http://blogs.technet.com/b/srd/archive/2011/05/18/new-version-of-emet-is-now-available.aspx"&gt;Enhanced Mitigation Experience Toolkit&lt;/a&gt;, a tool that allows the application of enhanced security mitigations around the application of your choice. &lt;/p&gt;
&lt;p&gt;While Internet Explorer 9 already natively includes many of the protections that EMET provides (including &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/10/10/understanding-data-execution-prevention-crashes-in-ie8.aspx"&gt;DEP/NX&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/03/07/internet-explorer-9-security-part-1-enhanced-memory-protections.aspx"&gt;SEHOP&lt;/a&gt;), the tool includes several mitigations that are not otherwise available, including the ability to force all DLLs to load with randomized base addresses (aka ForceASLR). These&amp;nbsp;mitigations can help prevent exploitation of certain types of memory-related vulnerabilities-- for instance, the SRD team blogs about a case where EMET&amp;nbsp;blocked an exploit&amp;nbsp;of a&amp;nbsp;PDF Reader application&amp;nbsp;by randomizing the base address of modules it loads.&lt;/p&gt;
&lt;p&gt;EMET has moved out of its experimental incubation phase and is now an officially supported Microsoft product.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10167944" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/tools/">tools</category></item><item><title>Socially-Engineered XSS Attacks</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/19/socially-engineered-xss-attacks-and-pasting-javascript-in-the-address-bar-in-ie9.aspx</link><pubDate>Thu, 19 May 2011 17:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10166404</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10166404</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/19/socially-engineered-xss-attacks-and-pasting-javascript-in-the-address-bar-in-ie9.aspx#comments</comments><description>&lt;p&gt;When the IE team talks about Cross-Site-Scripting (XSS) attacks, we&amp;rsquo;ve usually grouped them into three categories&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Type 0: DOM-based XSS&lt;/li&gt;
&lt;li&gt;Type 1: &amp;ldquo;Reflected&amp;rdquo; XSS&lt;/li&gt;
&lt;li&gt;Type 2: Persistent/Stored XSS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DOM-APIs like &lt;a href="http://msdn.microsoft.com/en-us/library/cc848922(v=vs.85).aspx"&gt;toStaticHTML&lt;/a&gt; enable pages to protect themselves against Type 0 attacks. The Internet Explorer &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/01/31/controlling-the-internet-explorer-xss-filter-with-the-x-xss-protection-http-header.aspx"&gt;XSS Filter&lt;/a&gt; can block Type 1 attacks by detecting reflected script and neutering it. Servers can protect themselves against Type 2 attacks using the &lt;a href="http://msdn.microsoft.com/en-us/security/aa973814.aspx"&gt;Anti-XSS library&lt;/a&gt; to sanitize stored data.&lt;/p&gt;
&lt;p&gt;It turns out, however, that there&amp;rsquo;s a fourth type of XSS attack: &lt;em&gt;Socially-engineered XSS&lt;/em&gt;. In a socially-engineered XSS attack, the user is tricked into running an attacker&amp;rsquo;s JavaScript code in the context of the victim site. Even if a site follows best-practices to block XSS Types 0, 1 and 2, they may still be vulnerable to Socially Engineered XSS attacks.&lt;/p&gt;
&lt;p&gt;Such attacks work in the same way as most socially-engineered attacks, by attacking the weakest link in browser security&amp;mdash;the user&amp;rsquo;s trust. The attacks request that the user perform a series of operations (often using keyboard key combinations) that result in a JavaScript URL being entered in the address bar and invoked. JavaScript URIs entered in this way execute in the context of the currently loaded page. Users are tricked into following these instructions with the promise of some reward (e.g. free &amp;ldquo;points&amp;rdquo; for games, &amp;ldquo;secret&amp;rdquo; information about other users, etc).&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a screenshot of an attack that I encountered yesterday:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4265.image_5F00_4AEFEDC4.png" width="748" height="507" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now, I&amp;rsquo;ve seen far slicker versions that mask themselves far more cleverly, such that the script isn&amp;rsquo;t ever seen. In the manner of an old &lt;a href="http://en.wikipedia.org/wiki/Konami_Code"&gt;game cheat&lt;/a&gt;, the unknowing user presses CTRL+C, CTRL+L, CTRL+V, ENTER, and the bad guy&amp;rsquo;s code runs.&lt;/p&gt;
&lt;p&gt;These attacks often target popular social networks, and their first action upon running is to spread to all of the user&amp;rsquo;s contacts, leading to an extremely rapid infection across the social graph. Thousands of users can fall for an attack like this in a few hours. After arranging to spread to the user&amp;rsquo;s contacts, these attacks typically engage in spamming malware-distributing links or other activities that generate revenue for the bad guys. Because the script runs in the security context of the victim page, any information on the current site may be available for perusal by the attacker.&lt;/p&gt;
&lt;p&gt;In Internet Explorer 9, we&amp;rsquo;ve added a simple protection that significantly raises the bar against this type of attack. Specifically, IE9 will remove the &amp;ldquo;JavaScript:&amp;rdquo; prefix&lt;sup&gt;[1] &lt;/sup&gt;from any string that is pasted into the address bar. So, in order for a user to fall victim to a self-inflicted attack of this nature, they have to be persuaded to copy/paste the attack code in the address bar, then go to the beginning of the URL, type &amp;ldquo;javascript:&amp;rdquo; and hit enter. This additional step adds complexity (and suspicion), and our early data that indicates that IE9 users are much less likely to fall victim to such attacks.&lt;/p&gt;
&lt;p&gt;Web-elites who would recognize this attack immediately (e.g. many readers of this blog&amp;rsquo;s small readership) might think this new protection cumbersome, since they can no longer trivially paste things like &amp;ldquo;javascript:alert(document.cookie);&amp;rdquo; into the address bar to see the current page&amp;rsquo;s cookies. However, IE will still allow pasting of the code itself, so you need only type the JavaScript protocol prefix. For script operations you undertake frequently, you can store the code in a simple &lt;a href="http://en.wikipedia.org/wiki/Bookmarklet"&gt;Bookmarklet&lt;/a&gt; and simply invoke that rather than trying to paste in the address bar. Internet Explorer 9 includes several improvements for bookmarklets. In IE9, a bookmarklet may now contain up to 5kb of JavaScript (previously, the limit was 2083 characters), and bookmarklets may again be dragged from a webpage into the Favorites bar, triggering the following prompt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0068.image_5F00_1C49BF15.png" width="384" height="240" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;-Eric Lawrence&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;[1]&lt;/sup&gt; Internet Explorer will actually strip out any script-prefix, including misspelled strings that might otherwise be autocorrected into a script prefix. Also, if there's existing content in the address bar (e.g. a &lt;strong&gt;j&lt;/strong&gt;) if adding pasted content (e.g. &lt;strong&gt;avascript&lt;/strong&gt;)&amp;nbsp;will create a script prefix, it will still be removed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10166404" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/BetterInIE9/">BetterInIE9</category></item><item><title>Detecting Captive Network Portals</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/18/how-windows-detects-a-captive-network-portal-and-prompts-to-open-a-browser.aspx</link><pubDate>Wed, 18 May 2011 13:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10165842</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10165842</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/18/how-windows-detects-a-captive-network-portal-and-prompts-to-open-a-browser.aspx#comments</comments><description>&lt;p&gt;Over on &lt;a href="http://www.superuser.com"&gt;SuperUser&lt;/a&gt;, there&amp;rsquo;s a great explanation of how Windows determines whether a newly-connected network has a proper Internet connection, or whether the user should open a browser to login or click through a Terms of Use agreement. The general idea is that Windows will attempt to download a webpage from a well-known URL, and if there were any errors or unexpected results, the user sees the prompt.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="89" width="424" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/7120.image_5F00_08BF5AD3.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Read more about &lt;a href="http://blog.superuser.com/2011/05/16/windows-7-network-awareness/"&gt;How Windows detects a Captive Network Portal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Applications which want to make use of this information can use the &lt;a href="http://msdn.microsoft.com/en-us/library/aa370799(v=VS.85).aspx"&gt;Network List Manager&lt;/a&gt; API. There's&amp;nbsp;a &lt;a href="http://msdn.microsoft.com/en-us/library/aa965311(v=VS.85).aspx"&gt;get_IsConnectedToInternet&lt;/a&gt; method on the &lt;a href="http://msdn.microsoft.com/en-us/library/aa370750(v=VS.85).aspx"&gt;INetwork&lt;/a&gt; interface and&amp;nbsp;the captive portal flag can be found by looking at the&amp;nbsp;VT_UINTs named&amp;nbsp;NA_InternetConnectivityV4 and NA_InternetConnectivityV6 in the INetwork's property bag. If the flag NLM_INTERNET_CONNECTIVITY_WEBHIJACK is set, then a captive portal was detected.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10165842" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Q_2600_amp_3B00_A/">Q&amp;amp;A</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Win7/">Win7</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/networking/">networking</category></item><item><title>URL Fragments and Redirects</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/17/url-fragments-and-redirects-anchor-hash-missing.aspx</link><pubDate>Mon, 16 May 2011 23:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10165123</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10165123</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/17/url-fragments-and-redirects-anchor-hash-missing.aspx#comments</comments><description>&lt;p&gt;I&amp;rsquo;ve worked on the Internet Explorer team for six+ years, and on web sites for a decade longer, so I&amp;rsquo;m understandably excited when I come across a browser behavior I can&amp;rsquo;t explain. Last week, I encountered such a mystery, and it took me quite a while to figure out what was going on.&lt;/p&gt;
&lt;h3&gt;Background&lt;/h3&gt;
&lt;p&gt;Facebook tends to use URL Fragments in their URLs. For instance, a car dealer&amp;rsquo;s website includes a link to their Facebook page thusly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;http://www.facebook.com/&lt;/span&gt;&lt;span style="background-color: #ffff00; font-family: Courier New; font-size: x-small;"&gt;#!/MBofWhitePlains?sk=app_192229990808929&lt;/span&gt;&lt;span style="font-family: Courier New; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Fragment component of the URL is the end of the URL from the hash symbol (#) onward. URL Fragments are never sent to the server in the HTTP request&amp;mdash; only JavaScript running in the page can see them. So, when your browser loads the URL above, the server sees only &amp;ldquo;http://www.facebook.com&amp;rdquo; in the request, and it&amp;rsquo;s the responsibility of JavaScript in&amp;nbsp;the returned page to examine the URL to find the extra information in the Fragment.&lt;/p&gt;
&lt;p&gt;Clicking on the link will go to the specified URL:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="69" width="503" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3034.image_5F00_thumb_5F00_558B6D09.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip;and then script on the page will redirect you to a final page which contains the &amp;ldquo;MBofWhitePlains&amp;rdquo; identifier in the URL path, clearing out the URL Fragment. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="107" width="535" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/8308.image_5F00_thumb_5F00_753A46D1.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now, you may have heard that Facebook now offers an opt-in choice to always use HTTPS when loading Facebook: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="92" width="563" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5277.image_5F00_thumb_5F00_7BED5054.png" alt="image" border="0" title="image" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you set this option, Facebook will immediately return a HTTP/302 redirect for a HTTPS page if your browser ever requests a page using HTTP. &lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s a problem for this scenario: because the URL Fragment is never sent to the server, the server sends your browser a redirect to https://www.facebook.com, with no URL Fragment specified. Hence, when the redirected page is loaded, the URL Fragment is blank, and you&amp;rsquo;re left on the Facebook homepage.&lt;/p&gt;
&lt;p&gt;Now, this made perfect sense to me&amp;mdash;a simple limitation of the way Facebook is using URLs.&lt;/p&gt;
&lt;p&gt;Except for one thing&amp;hellip;&lt;/p&gt;
&lt;p&gt;While Safari and Internet Explorer both behave as expected, Firefox, Chrome, and Opera were somehow landing on the HTTPS version of the car dealership&amp;rsquo;s Facebook page&amp;mdash;not the homepage. This was a truly surprising outcome, and I spent a ton of time ensuring that the different behavior wasn&amp;rsquo;t related to Facebook performing User-Agent sniffing and returning different responses, or anything of the sort. It turns out that the code was the same, but the browser behavior was very different.&lt;/p&gt;
&lt;h3&gt;Peeking behind the curtain&lt;/h3&gt;
&lt;p&gt;After much debugging, I realized that Firefox, Chrome, and Opera will re-attach a URL Fragment &lt;em&gt;after &lt;/em&gt;a HTTP/3xx redirection has taken place, even though that fragment was not present in the URL specified by the Location header on the redirection response. So&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;In Chrome/Opera/Firefox&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Loading &lt;strong&gt;http://foo/#SomeInfo&lt;/strong&gt; &amp;ndash;&amp;gt; HTTP/302 to &lt;strong&gt;Location: http://bar&lt;/strong&gt; =&amp;gt; final URL of &lt;strong&gt;http://bar/#SomeInfo&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;In Internet Explorer and Safari&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Loading &lt;strong&gt;http://foo/#SomeInfo&lt;/strong&gt; &amp;ndash;&amp;gt; HTTP/302 to &lt;strong&gt;Location: http://bar&lt;/strong&gt; =&amp;gt; final URL of &lt;strong&gt;http://bar/&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here&amp;rsquo;s a simple test page: &lt;a href="https://www.fiddler2.com/test/redir/fragment/"&gt;https://www.fiddler2.com/test/redir/fragment/&lt;/a&gt; demonstrating this behavior:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="182" width="586" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/2538.clip_5F00_image002_5F00_09BF9650.jpg" alt="clip_image002" border="0" title="clip_image002" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Interestingly, Chrome, Firefox, and Opera reattach the fragment information even in a cross-domain redirect, and even when redirect from HTTPS to HTTP.&lt;/p&gt;
&lt;p&gt;I wasn&amp;rsquo;t able to find anything in the HTML5 specification calling for this behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/spec/fetching-resources.html#fetching-resources"&gt;http://dev.w3.org/html5/spec/fetching-resources.html#fetching-resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/spec/history.html#scroll-to-fragid"&gt;http://dev.w3.org/html5/spec/history.html#scroll-to-fragid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The HTTP specification (RFC2616 and the active HTTPBIS revision) doesn&amp;rsquo;t specify proper behavior either, noting only that the behavior when the Location header itself contains a URL Fragment is not defined:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;Note: This specification does not define precedence rules for the case where the original URI, as navigated to by the user agent, and the Location header field value both contain fragment identifiers.&amp;nbsp; Thus be aware that including fragment identifiers might inconvenience anyone relying on the semantics of the original URI's fragment identifier.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip;although almost all browsers appear to respect a URL Fragment specified on the redirect response. Specifically, if &lt;em&gt;both &lt;/em&gt;the original URI &lt;em&gt;and &lt;/em&gt;the redirect &lt;strong&gt;Location &lt;/strong&gt;specify a fragment-- Internet Explorer,&amp;nbsp;Chrome, Firefox, and Safari will use the Fragment component from the Location header. Opera 11.01 will instead keep the Fragment component from the original URL; they only use the Fragment component from the Location header if the original URL didn't contain a fragment at all. Opera 11.11 changed that behavior to match Chrome and Firefox.&lt;/p&gt;
&lt;p&gt;Interesting stuff. &lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10165123" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/webdev/">webdev</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/interop/">interop</category></item><item><title>Controlling Java in Internet Explorer</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/15/controlling-java-in-internet-explorer.aspx</link><pubDate>Sun, 15 May 2011 19:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10164640</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10164640</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/15/controlling-java-in-internet-explorer.aspx#comments</comments><description>&lt;p&gt;Recently, there&amp;rsquo;s been some interest in how to control the use of Java within Internet Explorer. Java is a unique form of extensibility because it can be invoked in two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using an &lt;a href="http://msdn.microsoft.com/en-us/library/ms535183(v=vs.85).aspx"&gt;APPLET&lt;/a&gt; element&lt;/li&gt;
&lt;li&gt;Using an &lt;a href="http://msdn.microsoft.com/en-us/library/ms535859(v=vs.85).aspx"&gt;OBJECT&lt;/a&gt; element with a CLSID of a JVM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These two invocation methods are subject to different security controls, which I&amp;rsquo;ll describe in today&amp;rsquo;s post.&lt;/p&gt;
&lt;h2&gt;Controlling Applet Tags&lt;/h2&gt;
&lt;p&gt;When Internet Explorer encounters an APPLET tag, it checks the URLACTION_JAVA_PERMISSIONS value to determine whether the APPLET should be loaded. If the value is URL_POLICY_JAVA_PROHIBIT, then the APPLET tag is prevented from loading the JVM. In earlier versions of Internet Explorer, when a Microsoft JVM was available, this URLAction was exposed on the Tools &amp;gt; Internet Options &amp;gt; Security &amp;gt; Custom&amp;hellip; dialog, but it has since been removed. &lt;/p&gt;
&lt;p&gt;You can use the Group Policy Editor to control the URLAction under the node \Administrative Templates\Windows Components\Internet Explorer\Internet Control Panel\Security Page\&lt;em&gt;ZoneID&lt;/em&gt;: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="373" width="264" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5165.image_5F00_07827D1E.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Alternatively, you can make a small registry tweak to &lt;a href="https://www.fiddler2.com/dl/SimpleJVMSwitch.reg"&gt;add the JVM Options entry&lt;/a&gt; back to the Internet Control Panel:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/2045.image_5F00_15FD7943.png"&gt;&lt;img height="130" width="211" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/6330.image_5F00_thumb_5F00_3CCB8F83.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The registry script takes advantage of the fact that the Internet Control Panel UI is extensible via the registry; it simply creates a new item that adjusts the values of the URLACTION_JAVA_PERMISSIONS URLAction.&lt;/p&gt;
&lt;p&gt;If you adjust the Internet Zone settings from &amp;ldquo;High Security&amp;rdquo; to Disable (URL_POLICY_JAVA_PROHIBIT) any &lt;a href="http://www.natice.noaa.gov/ims/loop/nhem-1mo-loop.html"&gt;site attempting to use an APPLET tag&lt;/a&gt; will find that the applet does not load and a notification is shown:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="58" width="608" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4276.image_5F00_35AC530B.png" alt="&amp;quot;An add-on failed to run...&amp;quot; notification" border="0" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Controlling Object Tags&lt;/h2&gt;
&lt;p&gt;Unfortunately, when &lt;a href="http://deletethis.net/dave/qbp/"&gt;a site uses an OBJECT tag&lt;/a&gt; to load Java, an entirely different codepath is executed. In the OBJECT tag case, the JAVA_PERMISSIONS URLAction isn&amp;rsquo;t consulted, because as far as Internet Explorer is concerned, this might be any type of OBJECT. Instead, the &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/04/02/activex-control-restrictions-in-ie.aspx"&gt;traditional ActiveX-controlling features&lt;/a&gt; are consulted (e.g. ActiveX Filtering, Per-Site ActiveX, Manage Add-ons, etc). You can use IE&amp;rsquo;s Tools &amp;gt; Manage Add-ons feature to examine or adjust the state of the Java Plug-in object:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="89" width="763" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3108.image_5F00_437E9906.png" alt="Manage Add-ons Showing JVM Plugin" border="0" title="Java-related Add-ons" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: I&amp;rsquo;m told that the Java Plug-In SSV Helper Browser Helper object should not be disabled, as it ensures that websites may not attempt to load older (insecure) versions of the JVM you may have installed. However, you&amp;rsquo;ll notice that you pay a performance penalty on tab startup to load this BHO&amp;mdash;this is one of the many reasons I don&amp;rsquo;t install Java on my PCs.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you select the Java Plug-in, you can click the &lt;strong&gt;Disable &lt;/strong&gt;button to prevent Java from being loaded by an OBJECT tag. Alternatively, if you click the &lt;strong&gt;More Information &lt;/strong&gt;link, you can clear the&lt;strong&gt; *&lt;/strong&gt; from the list of sites on which the Java Plug-in may run: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/4760.image_5F00_3C5F5C8E.png"&gt;&lt;img height="170" width="353" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5340.image_5F00_thumb_5F00_4A31A289.png" alt="image" border="0" title="image" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you subsequently visit a site that attempts to invoke Java as an OBJECT tag, you will see a notification bar prompting you for permission to run Java on the current site.&lt;/p&gt;
&lt;p&gt;So, if you want to permit Java to run only in the Intranet and Trusted Sites zones:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adjust the URLAction for the Internet Zone to Disable &lt;/li&gt;
&lt;li&gt;Remove the * from the Per-Site list of the ActiveX Control&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Step #1 will ensure that only Intranet Zone and Trusted Zone sites may load Java for APPLET Tags. Step #2 will ensure that the Java Plug-in will not load as an OBJECT on Internet Zone sites; a notification will be shown instead. Because Intranet and Trusted Sites ignore the Per-Site ActiveX list, you won&amp;rsquo;t see any additional warnings on those sites.&lt;/p&gt;
&lt;p&gt;-Eric Lawrence&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10164640" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/user_2D00_choice/">user-choice</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/ActiveX/">ActiveX</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/add_2D00_ons/">add-ons</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/Zones/">Zones</category></item><item><title>Stylesheet Limits in Internet Explorer</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx</link><pubDate>Sat, 14 May 2011 21:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10164546</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10164546</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://support.microsoft.com/kb/262161"&gt;KB 262161&lt;/a&gt; outlines the maximum number of stylesheets and rules supported by Internet Explorer 6 to 9.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A sheet may contain up to 4095 rules&lt;/li&gt;
&lt;li&gt;A sheet may @import up to 31 sheets&lt;/li&gt;
&lt;li&gt;@import nesting supports up to 4 levels deep&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some folks have &lt;a href="http://www.automation-excellence.com/blog/internet-explorer-31-stylesheet-limit"&gt;wondered&lt;/a&gt; about the math that underlies these numbers. The root of the limitations is that Internet Explorer uses a 32bit integer to identify, sort, and apply the cascading rules. The integer&amp;rsquo;s 32bits are split into five fields: four sheetIDs of 5 bits each, and one 12bit ruleID. The 5 bit sheetIDs results in the 31 @import limit, and the 12 bit ruleID results in the 4095 rules-per-sheet limitation. While these limits are entirely sufficient for most sites, there are some sites (particularly&amp;nbsp;when using&amp;nbsp;&lt;a href="http://john.albin.net/css/ie-stylesheets-not-loading"&gt;frameworks&lt;/a&gt; and &lt;a href="http://blogs.telerik.com/blogs/posts/10-05-03/internet_explorer_css_limits.aspx"&gt;controls&lt;/a&gt;) that can encounter the limits, requiring workarounds.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a simple test page for the limits &lt;a href="http://demos.telerik.com/testcases/BrokenTheme.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff0000;"&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/span&gt;: IE10 Platform Preview #2 significantly &lt;a href="http://msdn.microsoft.com/en-us/ie/hh272902#_CSSRemoveLimits"&gt;raises the limits&lt;/a&gt; described above. In IE10 (any browser/document mode):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A sheet may contain up to 65534 rules&lt;/li&gt;
&lt;li&gt;A document may use up to 4095 stylesheets&lt;/li&gt;
&lt;li&gt;@import nesting is limited to 4095 levels (due to the 4095 stylesheet limit)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10164546" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/limitations/">limitations</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/webdev/">webdev</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/interop/">interop</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/BetterInIE10/">BetterInIE10</category></item><item><title>Avoid “Do not save encrypted pages to disk”</title><link>http://blogs.msdn.com/b/ieinternals/archive/2011/05/07/downloads-and-flash-fail-when-do-not-save-encrypted-pages-to-disk-is-set.aspx</link><pubDate>Sat, 07 May 2011 02:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10162025</guid><dc:creator>EricLaw [MSFT]</dc:creator><slash:comments>17</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/ieinternals/rsscomments.aspx?WeblogPostID=10162025</wfw:commentRss><comments>http://blogs.msdn.com/b/ieinternals/archive/2011/05/07/downloads-and-flash-fail-when-do-not-save-encrypted-pages-to-disk-is-set.aspx#comments</comments><description>&lt;p&gt;Internet Explorer has an Advanced option named &lt;strong&gt;Do not save encrypted pages to disk&lt;/strong&gt;. By default, this option is unchecked (except for Windows Server systems) and I recommend you leave it that way.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/0081.image_5F00_33336ED4.png"&gt;&lt;img height="127" width="427" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/3527.image_5F00_thumb_5F00_082B5B02.png" alt="INETCPL showing option" border="0" title="Enabling the Do Not Save option causes several problems..." style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In IE9, this option does exactly what it says it does&amp;mdash;resources received from HTTPS URLs are not placed in the Temporary Internet Files Cache and temporary files are not created for these resources. This option is universal for HTTPS responses; their headers (e.g. Pragma, Cache-Control) are not consulted.&lt;/p&gt;
&lt;p&gt;While that might sound appealing to some readers, it&amp;rsquo;s important to realize that this will break any scenario where a file is needed.&lt;/p&gt;
&lt;p&gt;There are two key scenarios when a file is required:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;File downloads.&lt;/li&gt;
&lt;li&gt;When an add-on or other code sets the flag &lt;a href="http://msdn.microsoft.com/en-us/library/aa383661(v=vs.85).aspx"&gt;INTERNET_FLAG_NEED_FILE&lt;/a&gt; on a request.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If a file download is attempted from HTTPS when this option is set, the &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2009/10/03/internet-explorer-cannot-download-over-https-when-no-cache.aspx"&gt;secure download will fail&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="84" width="511" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/1464.image_5F00_75E2943F.png" alt="File download failure" border="0" title="File download failure" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Similarly, some plugins like Flash will set the NEED_FILE flag when issuing a HTTPS request, and those requests will fail in this configuration. For instance, when Pandora attempts to login, their XML request fails:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="219" width="616" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-47-13-metablogapi/5277.image_5F00_03B4DA3B.png" alt="Pandora Login failure" border="0" title="Pandora login fails" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In IE8 and lower, the behavior of the checkbox was much more complicated, modified by a number of cumulative updates over the years. At a high-level, if a &lt;strong&gt;Pragma: no-cache &lt;/strong&gt;was present on the HTTPS response, then no cache or temporary file would be created. If other no-cache headers were present, then the cache or temporary file &lt;em&gt;might &lt;/em&gt;be created based on a very complicated set of logic, involving whether the response was compressed, and depending on the ordering of the &lt;strong&gt;no-cache &lt;/strong&gt;and &lt;strong&gt;no-store&lt;/strong&gt; tokens in the response&amp;rsquo;s Cache-Control header.&lt;/p&gt;
&lt;p&gt;If you do not want HTTPS-delivered content to be stored in your cache, then you are better off setting the &lt;strong&gt;Empty temporary internet files folder when browser is closed&lt;/strong&gt; option instead. Downloads and Flash applications will work properly, and IE will clear the cache completely when the browser is closed. If you're worried about local attacks with full access to your hard drive, enable BitLocker Drive Encryption, which will protect not only your cache files, but also your swap file.&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10162025" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/caching/">caching</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/https/">https</category><category domain="http://blogs.msdn.com/b/ieinternals/archive/tags/downloads/">downloads</category></item></channel></rss>
