<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: From the Top: MIME and Content Negotiation</title>
	<atom:link href="http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/</link>
	<description>a web developer with standards</description>
	<lastBuildDate>Sun, 24 Jan 2010 17:34:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Torsten</title>
		<link>http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/comment-page-1/#comment-47</link>
		<dc:creator>Torsten</dc:creator>
		<pubDate>Tue, 17 Jan 2006 01:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thatstandardsguy.co.uk/2006/01/13/from-the-top-content-negotiation/#comment-47</guid>
		<description>Neil, my apologies.  I&#039;ve just looked over your script again and I realise I was reading it all wrong.  Your initial stristr search for the string application/xhtml+xml is sufficient, and the reg exp only comes in to play if a q value of anything less than 1 is specified in the accept header.  The logic threw me initially, but I see now that it would work perfectly well.</description>
		<content:encoded><![CDATA[<p>Neil, my apologies.  I&#8217;ve just looked over your script again and I realise I was reading it all wrong.  Your initial stristr search for the string application/xhtml+xml is sufficient, and the reg exp only comes in to play if a q value of anything less than 1 is specified in the accept header.  The logic threw me initially, but I see now that it would work perfectly well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Dawson</title>
		<link>http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/comment-page-1/#comment-46</link>
		<dc:creator>Karl Dawson</dc:creator>
		<pubDate>Mon, 16 Jan 2006 21:38:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.thatstandardsguy.co.uk/2006/01/13/from-the-top-content-negotiation/#comment-46</guid>
		<description>Update to article:

Clarified and expanded on the fact that the &lt;abbr title=&quot;Extensible Markup Language&quot;&gt;XML&lt;/abbr&gt; Declaration and XML-stylesheet reference (along with the DOCTYPE) are part of the &lt;abbr title=&quot;Extensible Markup Language&quot;&gt;XML&lt;/abbr&gt; Prolog - and how to write  each part.

Clarified that &apos; is unsupported in &lt;abbr title=&quot;Hypertext Markup Language&quot;&gt;HTML&lt;/abbr&gt; 4.

Reworked &lt;abbr title=&quot;Hypertext Markup Language&quot;&gt;HTML&lt;/abbr&gt; comments in scripts.

Added Point 11 in &quot;Doing the Right Thing&quot; section.

My thanks to Lachlan Hunt, Jukka K. Korpela, &lt;a href=&quot;http://sitesurgeon.co.uk/&quot; rel=&quot;nofollow&quot;&gt;Ben Millard&lt;/a&gt; and Torsten (above and forum member at &lt;a href=&quot;http://www.accessify.com&quot; rel=&quot;nofollow&quot;&gt;Accessify.com&lt;/a&gt;)</description>
		<content:encoded><![CDATA[<p>Update to article:</p>
<p>Clarified and expanded on the fact that the <abbr title="Extensible Markup Language">XML</abbr> Declaration and XML-stylesheet reference (along with the DOCTYPE) are part of the <abbr title="Extensible Markup Language">XML</abbr> Prolog &#8211; and how to write  each part.</p>
<p>Clarified that &amp;apos; is unsupported in <abbr title="Hypertext Markup Language">HTML</abbr> 4.</p>
<p>Reworked <abbr title="Hypertext Markup Language">HTML</abbr> comments in scripts.</p>
<p>Added Point 11 in &#8220;Doing the Right Thing&#8221; section.</p>
<p>My thanks to Lachlan Hunt, Jukka K. Korpela, <a href="http://sitesurgeon.co.uk/" rel="nofollow">Ben Millard</a> and Torsten (above and forum member at <a href="http://www.accessify.com" rel="nofollow">Accessify.com</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torsten</title>
		<link>http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/comment-page-1/#comment-43</link>
		<dc:creator>Torsten</dc:creator>
		<pubDate>Mon, 16 Jan 2006 20:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.thatstandardsguy.co.uk/2006/01/13/from-the-top-content-negotiation/#comment-43</guid>
		<description>Hi Neil,

As I say, I&#039;m not an expert, but I am rather surprised that it works.

The accept header for Firefox 1.07 under GNU/Linux is as follows - 

&lt;pre&gt;&lt;code&gt;text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&lt;/code&gt;&lt;/pre&gt;

...your regular expression doesn&#039;t match anything in that string.  By my understanding your script would therefore serve text/html to Firefox when, according to its accept header anyway, it prefers application/xhtml+xml.

I just had a look at Simon&#039;s article and his reg exp seems much better.  It is in fact very similar to the one I use myself:

&lt;code&gt;$htmlmimetype = &#039;/text\/html(?:;q=([01](?:\.\d{1,3})?))?/i&#039;;
$xhtmlmimetype = &#039;/application\/xhtml\+xml(?:;q=([01](?:\.\d{1,3})?))?/i&#039;;&lt;/code&gt;

...so I would say that wouldn&#039;t I ;o)</description>
		<content:encoded><![CDATA[<p>Hi Neil,</p>
<p>As I say, I&#8217;m not an expert, but I am rather surprised that it works.</p>
<p>The accept header for Firefox 1.07 under GNU/Linux is as follows &#8211; </p>
<pre><code>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</code></pre>
<p>&#8230;your regular expression doesn&#8217;t match anything in that string.  By my understanding your script would therefore serve text/html to Firefox when, according to its accept header anyway, it prefers application/xhtml+xml.</p>
<p>I just had a look at Simon&#8217;s article and his reg exp seems much better.  It is in fact very similar to the one I use myself:</p>
<p><code>$htmlmimetype = '/text\/html(?:;q=([01](?:\.\d{1,3})?))?/i';<br />
$xhtmlmimetype = '/application\/xhtml\+xml(?:;q=([01](?:\.\d{1,3})?))?/i';</code></p>
<p>&#8230;so I would say that wouldn&#8217;t I ;o)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Crosby</title>
		<link>http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/comment-page-1/#comment-42</link>
		<dc:creator>Neil Crosby</dc:creator>
		<pubDate>Mon, 16 Jan 2006 19:17:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.thatstandardsguy.co.uk/2006/01/13/from-the-top-content-negotiation/#comment-42</guid>
		<description>And yes, my article is based on Simon&#039;s original work - it wouldn&#039;t have been written if he hadn&#039;t done his stuff first.</description>
		<content:encoded><![CDATA[<p>And yes, my article is based on Simon&#8217;s original work &#8211; it wouldn&#8217;t have been written if he hadn&#8217;t done his stuff first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Crosby</title>
		<link>http://www.thatstandardsguy.co.uk/2006/01/content-negotiation/comment-page-1/#comment-41</link>
		<dc:creator>Neil Crosby</dc:creator>
		<pubDate>Mon, 16 Jan 2006 19:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.thatstandardsguy.co.uk/2006/01/13/from-the-top-content-negotiation/#comment-41</guid>
		<description>Thanks for the link through to my article Karl - it was a nice surprise to come home from work to.  

Torsten: I can&#039;t recall my exact thinking behind using that regex in that way, but what I can say is that I&#039;ve been using that script (or versions of it) for about two years now, and I haven&#039;t had it blow up in my face yet.

I&#039;ve just had a quick play with Firefox, changing &quot;network.http.accept.default&quot; (vie about:config) to contain various different q-values and I couldn&#039;t get the script to do anything unexpected.  &lt;strong&gt;However&lt;/strong&gt; I am not convinced that you don&#039;t (whoa, too many negatives there) have a point, so I&#039;m going to go back and have a proper look at the script later in the week.</description>
		<content:encoded><![CDATA[<p>Thanks for the link through to my article Karl &#8211; it was a nice surprise to come home from work to.  </p>
<p>Torsten: I can&#8217;t recall my exact thinking behind using that regex in that way, but what I can say is that I&#8217;ve been using that script (or versions of it) for about two years now, and I haven&#8217;t had it blow up in my face yet.</p>
<p>I&#8217;ve just had a quick play with Firefox, changing &#8220;network.http.accept.default&#8221; (vie about:config) to contain various different q-values and I couldn&#8217;t get the script to do anything unexpected.  <strong>However</strong> I am not convinced that you don&#8217;t (whoa, too many negatives there) have a point, so I&#8217;m going to go back and have a proper look at the script later in the week.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
