<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Tom Moertel's Weblog: Google Web Accelerator vs. unsafe linking: Round Two!</title>
    <link>http://blog.moertel.com/articles/2005/10/25/google-web-accelerator-vs-unsafe-linking-round-two</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Quality rants on programming theory and stuff geeks like</description>
    <item>
      <title>Google Web Accelerator vs. unsafe linking: Round Two!</title>
      <description>&lt;p&gt;The good folks at &lt;a href="http://37signals.com"&gt;37signals&lt;/a&gt; are once again up
in arms about &lt;a href="http://webaccelerator.google.com/"&gt;Google Web
Accelerator&lt;/a&gt; (GWA).  David
Heinemeier Hansson (DHH), in particular, writes in a recent post to
&lt;a href="http://37signals.com/svn/"&gt;Signal vs. Noise&lt;/a&gt; that &amp;#8220;[GWA] was evil
enough the first time around, but this time it&amp;#8217;s downright scary.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;The problem, it seems, is that &lt;span class="caps"&gt;GWA&lt;/span&gt; automatically, silently, and
unblockably follows hypertext links to web pages that are linked to by
the pages you visit.  It does this in order to cache those pages so
that if you visit them later, it will have cached copies ready in an
instant, thus &amp;#8220;accelerating&amp;#8221; your web surfing.  But some web
developers use hypertext links to trigger potentially unsafe actions,
such as deleting records in a database, and when &lt;span class="caps"&gt;GWA&lt;/span&gt; automatically
follows such links, it triggers the actions.&lt;/p&gt;


	&lt;p&gt;Oops.&lt;/p&gt;


	&lt;h3&gt;Let&amp;#8217;s do the time warp again&amp;#8230;&lt;/h3&gt;


	&lt;p&gt;Now, if this story sounds familiar, that&amp;#8217;s because half a year
ago, the exact same thing happened.  &lt;span class="caps"&gt;GWA&lt;/span&gt; was unveiled to the public.
People started using it.  And some of those people started losing data
from their accounts with popular web applications, such as
37signal&amp;#8217;s own &lt;a href="http://www.backpackit.com/"&gt;Backpack&lt;/a&gt;.  37signals
&lt;a href="http://37signals.com/svn/archives2/google_web_accelerator_hey_not_so_fast_an_alert_for_web_app_designers.php"&gt;publicized the problem in their blog&lt;/a&gt; and &lt;span class="caps"&gt;DHH&lt;/span&gt; even
&lt;a href="http://www.loudthinking.com/arc/000454.html"&gt;called for a recall on &lt;span class="caps"&gt;GWA&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;And then the community responses came in.  For the most part, the
responses could be divided into two camps, based on who was
blamed for the problem. The first camp blamed the web designers who used
links to trigger unsafe actions (in violation of applicable standards),
and the second camp blamed Google for unleashing &lt;span class="caps"&gt;GWA&lt;/span&gt; upon a web where
standards aren&amp;#8217;t always followed.&lt;/p&gt;


	&lt;p&gt;Both viewpoints had some merit, but I was in the first camp and thus
argued for following the standards and against unsafe linking
practices:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://community.moertel.com/ss/space/start/2005-05-06/1#Google_Web_Accelerator_offers_web_developers_an_important_opportunity"&gt;Google Web Accelerator offers web developers an important opportunity&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://community.moertel.com/ss/space/start/2005-05-08/1"&gt;Taking the unsafe GETs out of Rails&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;What surprised me was that so many people in the second camp argued in
defense of unsafe linking practices, which I had thought indefensible.
I didn&amp;#8217;t have any problem with arguments against Google&amp;#8217;s unleashing
&lt;span class="caps"&gt;GWA&lt;/span&gt; on an imperfect web, but arguing &lt;em&gt;for&lt;/em&gt; the web&amp;#8217;s imperfections
seemed like an odd way of making the case.  The supportive arguments
boiled down to the following:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Lots of web sites use action-triggering links, so the practice is &lt;em&gt;de facto&lt;/em&gt; acceptable.&lt;/li&gt;
		&lt;li&gt;The existing palette of user-interface options is too limited for today&amp;#8217;s web applications; thus, designers are justified in breaking the rules.&lt;/li&gt;
		&lt;li&gt;The standards don&amp;#8217;t actually prohibit the practice (they say &amp;#8220;SHOULD &lt;span class="caps"&gt;NOT&lt;/span&gt;,&amp;#8221; not &amp;#8220;MUST &lt;span class="caps"&gt;NOT&lt;/span&gt;&amp;#8221;); thus, the practice is allowable.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;None of the arguments seem to withstand scrutiny.  The first argument
breaks down like so: That lots of web sites do it only means that
those sites get away with it, not that the practice is acceptable.
Further, as &lt;span class="caps"&gt;GWA&lt;/span&gt; demonstrates, those sites may not get away with the
practice much longer.&lt;/p&gt;


	&lt;p&gt;The second argument breaks down when one examines the uses of unsafe
linking practices.  Most of them could be replaced by safe practices
through modest UI refactoring.  Given that safe alternatives exist,
the unsafe practices are not justified by virtue of being the only realistic option.&lt;/p&gt;


	&lt;p&gt;The third argument breaks down when one actually reads the relevant
standards.  Then it becomes clear that one should not use links to
trigger potentially unsafe actions.  The wiggle room created
by the use of &amp;#8220;SHOULD &lt;span class="caps"&gt;NOT&lt;/span&gt;&amp;#8221; instead of &amp;#8220;MUST &lt;span class="caps"&gt;NOT&lt;/span&gt;&amp;#8221; does not admit 
the large problems caused by unsafe linking.&lt;/p&gt;


	&lt;p&gt;Finally, even if there were some justification for unsafe linking, the
practice would still be a bad idea: its costs and risks outweigh its
benefits.  Why hold back the potential of efficient caching
architectures for the web?  Why risk data loss for your users?  It&amp;#8217;s
not worth it.&lt;/p&gt;


	&lt;h3&gt;Back to the Future&lt;/h3&gt;


	&lt;p&gt;So where are we now?  Given how little justification there is for
unsafe linking practices, one would hope that we would have abandoned
them by now.  But, as the recent cries about the second coming of &lt;span class="caps"&gt;GWA&lt;/span&gt;
suggest, the web-development community is not yet ready to give up those
sexy, action-triggering links.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s not that the means aren&amp;#8217;t available.  Rails, for example, has
plenty of support for sane and safe practices for triggering actions.
Rather, the problem is cultural.  Too many influential people,
especially in the Rails community, are unrepentant users of &amp;#8211; and, dare
I say it, apologists for &amp;#8211; action-triggering links.  Until this changes, I
expect many new web developers to pick up dangerous habits from the
very people they respect most.&lt;/p&gt;


	&lt;p&gt;Fortunately, many other respect-worthy people are pointing toward
a better way:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.intertwingly.net/blog/2005/10/24/Theyre-baaaaaaack"&gt;Sam Ruby&lt;/a&gt;: &amp;#8220;I&amp;#8217;m on the other side of this debate. While this appears to be a purely philosophical concern, in reality this stuff matters.&amp;#8221; &lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.dehora.net/journal/2005/10/hey_im_back.html"&gt;Bill de hÓra&lt;/a&gt;: &amp;#8220;The &lt;span class="caps"&gt;GWA&lt;/span&gt; is back and following &lt;span class="caps"&gt;GET&lt;/span&gt; links again&amp;#8230; The technology itself is interesting insofar as we are going to see more and more highly automated robots enter the web over the next few years&amp;#8230;. Even more interesting is the kind of outrage holding forth in places like Signal v Noise&amp;#8230;.&amp;#8221; &lt;/li&gt;
		&lt;li&gt;&lt;a href="http://bitworking.org/news/Five_months_later_and_web_standards_still_matter"&gt;Joe Gregorio&lt;/a&gt; : &amp;#8220;And now we begin the next chapter in which Pooh discovers that five months after the first time Google turned on &lt;span class="caps"&gt;GWA&lt;/span&gt; that standards still matter.&amp;#8221;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I hope that this time around the web-development community answers
the wake-up call.  It&amp;#8217;s time to abandon action-triggering links.&lt;/p&gt;</description>
      <pubDate>Tue, 25 Oct 2005 16:12:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:23f7ff724af7f0e12fe123ff3e7362ab</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2005/10/25/google-web-accelerator-vs-unsafe-linking-round-two</link>
      <category>web development</category>
      <category>rails</category>
      <category>rest</category>
      <category>get</category>
      <category>gwa</category>
      <category>safe</category>
      <category>unsafe</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/8</trackback:ping>
    </item>
  </channel>
</rss>
