<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:ent="http://www.purl.org/NET/ENT/1.0/">
  <channel>
    <title>Curiouser and Curiouser! on web-standards</title>
    <link>http://matt.blogs.it/</link>
    <description>RSS feed for topic web-standards</description>
    <copyright>Copyright 2008 Matt Mower. Some rights reserved.</copyright>
    <generator>Squib/0.5.0.382</generator>
    <managingEditor>self@mattmower.com</managingEditor>
    <webMaster>self@mattmower.com</webMaster>
    <language>en-gb</language>
    <item>
      <title>Who came up with this shit?</title>
      <link>http://matt.blogs.it/entries/00002782.html</link>
      <pubDate>Tue, 22 Jan 2008 16:48:35 +0000</pubDate>
      <description>&lt;p&gt;So, the iPhone user-agent string (that Mobile Safari sends to the server to identify itself is):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So it's Mozilla 5, but it's AppleWebKit, but thats KHTML, but like Gecko. WTF?&lt;/p&gt;

&lt;p&gt;I bet this is Microsoft's fault. I bet some time back in the IE2 or IE3 days they did something slimy that started requiring everyone else to bend the user-agent string until we end up with this wretched mess which will probably plague us until someone invents &lt;em&gt;the next web&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If you're wondering why I'm frothing about this it's because I am parsing user-agent strings to make a guess about a type of codec to use (or whether a device can even use one) and the user-agent string is all we got.&lt;/p&gt;

&lt;p&gt;This should not be required.&lt;/p&gt;

&lt;p&gt;What these browsers &lt;strong&gt;should&lt;/strong&gt; be passing is an HTTP header that specifies what standards they support, e.g.:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;HTML3 # no exceptions
HTML4 +some_stupid_extension -bug1 -bug2
HTML5 +some_custom_extension -buggy_feature -not_yet -and_so_on
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and, to make my life easier some kind of header that outlines the supported video and audio codecs. Although that would be much easier to deal with if user agent strings just unambiguously identified the device/browser instead of playing stupid &lt;em&gt;compatibility&lt;/em&gt; games.&lt;/p&gt;</description>
      <guid isPermaLink="true">http://matt.blogs.it/entries/00002782.html</guid>
      <ent:cloud ent:href="http://matt.blogs.it/topics/">
      </ent:cloud>
    </item>
  </channel>
</rss>