<?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>Windows Live Quantum Mechanics : Rants</title><link>http://blogs.msdn.com/dthorpe/archive/tags/Rants/default.aspx</link><description>Tags: Rants</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>My Content, My Tags</title><link>http://blogs.msdn.com/dthorpe/archive/2007/05/16/my-content-my-tags.aspx</link><pubDate>Wed, 16 May 2007 20:36:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2677152</guid><dc:creator>dthorpe</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/dthorpe/comments/2677152.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dthorpe/commentrss.aspx?PostID=2677152</wfw:commentRss><description>&lt;p&gt;Tagging online content with categories or keywords is a great idea.&amp;nbsp; I love GMail's use of labels instead of folders.&amp;nbsp; I tag all my Flickr photos six ways to Sunday.&amp;nbsp; &lt;/p&gt; &lt;p&gt;What I'm not so excited about are sites that encourage others to put public&amp;nbsp;tags on my stuff.&amp;nbsp; Who are these people?&amp;nbsp; And no, stupid, that photo is not a parrot, it's a penguin.&amp;nbsp; I should know, I was there!&lt;/p&gt; &lt;p&gt;This sums it up quite nicely:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://xkcd.com/c262.html"&gt;&lt;img src="http://imgs.xkcd.com/comics/in_ur_reality.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2677152" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dthorpe/archive/tags/Rants/default.aspx">Rants</category><category domain="http://blogs.msdn.com/dthorpe/archive/tags/web/default.aspx">web</category></item><item><title>Avoiding Popup Blockers in Your Web Apps</title><link>http://blogs.msdn.com/dthorpe/archive/2007/05/15/avoiding-popup-blockers-in-your-web-apps.aspx</link><pubDate>Wed, 16 May 2007 00:51:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2657804</guid><dc:creator>dthorpe</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/dthorpe/comments/2657804.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dthorpe/commentrss.aspx?PostID=2657804</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://timheuer.com/blog/"&gt;Tim Heuer&lt;/a&gt; laments the growing number of otherwise reputable web sites that instruct their flocks to &lt;a href="http://timheuer.com/blog/archive/2007/05/07/14076.aspx"&gt;disable popup blockers&lt;/a&gt; in order to complete some task within that web site.&lt;/p&gt; &lt;p&gt;Having stumbled into popup blocker hell myself only a few months ago with the &lt;a href="http://dev.live.com/contactscontrol/v0.2/default.aspx"&gt;Windows Live Contacts Control&lt;/a&gt; I can certainly attest to how easy it is for the blissfully ignorant (me!) to get snared by a popup blocker.&amp;nbsp; However, I agree with Tim that popup blockers provide a valuable service and disabling them should not be part of anyone's standard operating procedure, especially when the target audience is the non-technical consumer.&lt;/p&gt; &lt;p&gt;When a&amp;nbsp;web site asks you to lower your shields in order to complete an online order or do some other mundane task, it seems a little odd.&amp;nbsp; But when you consider how easy it is to avoid tripping popup blocker alarms, asking the consumer to disable them is just plain sad.&lt;/p&gt; &lt;p&gt;The purpose of a popup blocker is to block popup "spam"&amp;nbsp;- windows that pop up without the user's consent or request.&amp;nbsp;Some of the more irritating sites throw up dozens of popup windows all at once, leaving the viewer lost in a forest of trash.&amp;nbsp; Some toss up a popup window when you leave their site.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Why do the popup spammers&amp;nbsp;do it?&amp;nbsp; To artificially inflate their page view counts.&amp;nbsp;A browser popup window&amp;nbsp;showing a particular HTML page counts&amp;nbsp;as a page view, whether the consumer is looking at it or not.&amp;nbsp; Most banner advertisers consider that action a form of click fraud, and at a minimum grounds for termination of your ad serving account.&lt;/p&gt; &lt;p&gt;Here's the deal:&amp;nbsp; &lt;strong&gt;Popup blockers in web browsers don't block all popup windows.&lt;/strong&gt;&amp;nbsp; A popup window that is opened in direct response to a user action, such as a button click, will not trigger a popup blocker alarm.&amp;nbsp; If you do a window.open() in a JavaScript button click event, the window opens without issue.&amp;nbsp; If the same code executes in a timer event, it will trip a popup blocker alarm.&amp;nbsp; Why?&amp;nbsp; Because a timer event is not the direct result of a user action.&amp;nbsp; &lt;/p&gt; &lt;p&gt;The same goes for page loads, page unloads, XMLHttpRequest events, or anything else that is not a direct user action implying consent.&amp;nbsp;&amp;nbsp;Mouse clicks are user actions.&amp;nbsp; I haven't tried this, but I'd be willing to bet that mouse hovers over an&amp;nbsp;HTML element do not qualify as a user action.&amp;nbsp; If anything, waiving the mouse around on the screen indicates &lt;em&gt;indecision&lt;/em&gt;!&lt;/p&gt; &lt;p&gt;Different popup blockers have different degrees of sophistication in how they determine whether a window.open() is happening in response to a user action.&amp;nbsp; Some may tolerate&amp;nbsp;a call to window.open() being made in a subroutine called by a click event, but for best results across the board keep the window.open as close to the click event as possible.&amp;nbsp; Meaning:&amp;nbsp;keep the window.open&amp;nbsp;in the click event itself.&lt;/p&gt; &lt;p&gt;We tripped over this&amp;nbsp;in the first iteration of the Windows Live Contacts Control's WriteAPI.&amp;nbsp; When a third party web app submits contact data to the Contacts control, we need to make sure the user is aware of what the third party app is doing, so we need to show the submitted data to them and ask for their approval of the action.&amp;nbsp; There isn't enough screen real estate in the control itself to display the potentially large data, so a popup window is justified.&lt;/p&gt; &lt;p&gt;Let's say the user clicks a button on the third party web page to send data into the contacts control.&amp;nbsp; The web app calls a method on the Contacts control, which is actually JavaScript from our library executing in the context of the third party app.&amp;nbsp; Our code sanity checks the data, then bundles it up and tosses it over the domain barrier to our code that lives inside the Contacts control iframe, hosted on a Microsoft domain.&amp;nbsp; Our code on the inside checks the data again, then opens a popup window to ask the user to review and approve the submitted data.&lt;/p&gt; &lt;p&gt;That's where we got caught - the JavaScript code opening the popup window was not directly tied to a user click.&amp;nbsp; In our minds it was the direct result of the user click, but in the reality of the browser there were far too many call frames and other indirections between the user action and the window.open for the popup blocker to determine a causal relationship between them.&lt;/p&gt; &lt;p&gt;One solution that&amp;nbsp;came to mind (very briefly)&amp;nbsp;was to display the confirmation popup window from our code that executes in the context of the third party web app.&amp;nbsp; This has many problems, not the least of which is that we cannot trust code that is executing in the third party domain context.&amp;nbsp; We can only trust code that executes in the context of our own domain.&amp;nbsp; Besides, given that our code would still be at least one function call removed from the actual user action event, this approach is likely to fail with less sophisticated popup blockers.&lt;/p&gt; &lt;p&gt;Our solution?&amp;nbsp; Display a message&amp;nbsp;inside the Contacts control to inform the user that data had been received from the web app, and prompt the user to "Click here to review the data".&amp;nbsp; This solution has the downside of introducing an extra user click into the chain of events, but that click is what enables us to display the popup window from our JavaScript running in the context of our Microsoft domain without offending the popup blockers.&lt;/p&gt; &lt;p&gt;So, we should allow some measure of&amp;nbsp;understanding for&amp;nbsp;a web app that stumbles into popup blockers unexpectedly.&amp;nbsp; The web&amp;nbsp;developer is only guilty of a little ignorance and lack of testing.&amp;nbsp; &lt;/p&gt; &lt;p&gt;But a web site that actively instructs you to disable popup blockers to use their site? This is where making ignorance into corporate policy&amp;nbsp;has become easier than understanding the problem and its usually trivial solution.&amp;nbsp; Show them no mercy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2657804" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dthorpe/archive/tags/Windows+Live/default.aspx">Windows Live</category><category domain="http://blogs.msdn.com/dthorpe/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/dthorpe/archive/tags/Rants/default.aspx">Rants</category><category domain="http://blogs.msdn.com/dthorpe/archive/tags/web/default.aspx">web</category></item><item><title>Why More Websites Don't Support Opera</title><link>http://blogs.msdn.com/dthorpe/archive/2006/11/07/why-more-websites-don-t-support-opera.aspx</link><pubDate>Tue, 07 Nov 2006 20:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1019083</guid><dc:creator>dthorpe</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dthorpe/comments/1019083.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dthorpe/commentrss.aspx?PostID=1019083</wfw:commentRss><description>&lt;P&gt;Two words:&amp;nbsp; No debugger.&lt;/P&gt;
&lt;P&gt;Part of our charter here in the Windows Live team is to support as many browsers as practical.&amp;nbsp; I'd received reports that our Windows Live Contacts control doesn't do much in an Opera browser, so in the calm&amp;nbsp;following the&amp;nbsp;signing off our most recent "sprint" I indulged in a diversion to&amp;nbsp;trek off to Opera land to install their latest incarnation.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It's a great looking browser - slick UI, slick PR packaging,&amp;nbsp;slick photos of monochrome Scandinavian 20somethings suffering from incurable coolness.&amp;nbsp; And red hats.&amp;nbsp; For a browser, it does what it needs to do&amp;nbsp;well - it browses.&lt;/P&gt;
&lt;P&gt;When a JavaScript app throws an exception or blows chunks, the Opera error dialog is definitely a step up from IE's typical vagaries.&amp;nbsp; Instead of something like "Object doesn't support this property", Opera will tell you which object and which property, and which line number, and so forth.&lt;/P&gt;
&lt;P&gt;But what do you do when your JavaScript code doesn't fail badly, and doesn't succeed?&amp;nbsp; A spiffy error dialog is only helpful when there is a fatal error.&amp;nbsp; How do Opera advocates debug program flow logic and other intangibles in flight?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I couldn't find a debugger in the Opera options or add-ons, so I looked in the FAQs and questions on the Opera community forum.&amp;nbsp; No dice, other than an item in the FAQ heralding Opera's error dialog as infinitely better than IE.&amp;nbsp; It's true, it is&amp;nbsp;a much better error dialog.&amp;nbsp;&amp;nbsp;But an error dialog is reactive, and after the fact.&amp;nbsp; A debugger is proactive, and lets you look around inside the box.&amp;nbsp; You can learn more about a program's actual execution&amp;nbsp;in 5 minutes in a debugger (with an inspector window / expression evaluator) than in a week&amp;nbsp;of staring at source code.&amp;nbsp; Diagnosing problems by looking at source code is speculative, based on your assumptions about the execution environment.&amp;nbsp;Diagnosing problems by looking at them execute is&amp;nbsp;as close to touching binary reality as we're going to get.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;So I created an account on the Opera community forum to ask the question.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;(Curious:&amp;nbsp; the Opera community account creation confirmation email to my Microsoft email address never arrived.&amp;nbsp; The confirmation to my home address arrived in a matter of minutes.&amp;nbsp; Is that an Opera filter banning messages to Microsoft or a Microsoft filter banning messages from Opera?&amp;nbsp; I can't tell from this end.)&lt;/P&gt;
&lt;P&gt;The response?&amp;nbsp; Opera doesn't have a script debugger.&amp;nbsp; Opera advocates recommend strewing alerts or output statements throughout your JavaScript in order to get a picture of how execution flows through your code.&amp;nbsp; The phrase "put an output statement after every line of code you're interested in" was actually uttered.&lt;/P&gt;
&lt;P&gt;That's nuts.&amp;nbsp; What would normally be a 5 minute spelunk through the code in any&amp;nbsp;serious browser suddenly becomes hours of crawling around in a haystack.&amp;nbsp; I'd love to add Opera to our list, but it's not worth that much effort.&amp;nbsp; Omission of script debugging support may not be a show stopper for hacks working on small apps, but it definitely presents an obstacle for large, complex web apps.&amp;nbsp; Without a script debugger, Opera does not scale.&lt;/P&gt;
&lt;P&gt;All hope is not lost, though.&amp;nbsp; I know Opera gets lost somewhere in the Atlas initialization.&amp;nbsp; Perhaps the Atlas team has a newer build we should be using, or some other opportunity to divert / share the pain of diagnosing this Opera issue.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1019083" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dthorpe/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/dthorpe/archive/tags/Rants/default.aspx">Rants</category></item></channel></rss>