A lot of good points there, but the part about detecting mobile devices is a bit short sighted. Varying your content based on mobile User-Agent (or any User-Agent actually) renders public caches almost impossible to get right.
>> Varying your content based on mobile User-Agent (or any User-Agent actually) renders public caches almost impossible to get right. Interesting. What would you recommend doing instead, supposing, for example, that you are meant to be returning a different set of items depending on a device identifier, and that you have to support 100s of devices? Should this be considered a different resource instead of a different…
On his mobile example, it's much easier to simply be pragmatic and serve content for different devices at differents URIs/domains altogether. It doesn't break if you can follow some kind of convention, such that the URLs from one map directly to the other (for instance, mysite.com/news/article -> m.mysite.com/news/article) and then you issue redirects accordingly.