[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [syndication] friendlier feeds



Accept is a great way to go.
When I wanted a non-html rendition to be used by a web browser, and since it
is hard to control the Accept header from a web browser, I 'tunneled' the
header in to a URL query term something like accept=text/xml (the 'do:'
means it is an emulation of HTTP concepts of the same name).

There is some discussion here about this also:
 http://groups.yahoo.com/group/syndication/message/2633

mike

----- Original Message -----
From: "Mark Nottingham" <mnot@mnot.net>
To: <syndication@yahoogroups.com>
Sent: Monday, December 31, 2001 12:25 PM
Subject: [syndication] friendlier feeds


>
> I've been playing with making feeds friendlier, using content
> negotiation.
>
> For example:
>   http://www.mnot.net/bookmarks/feed
>
> If you request it with a browser, you'll get an HTML page, telling
> you how to use RSS; if you request it with an aggregator, you'll get
> the RSS. This is because your browser sends an Accept: header
> containing 'text/html'.
>
> In Apache, I do this with this directive in access.conf:
>
>   <LocationMatch "/feed$">
>   Options +MultiViews
>   </LocationMatch>
>
> Then, whenever I publish a feed, I put in two files; feed.rss and
> feed.html.
>
> I haven't tested this with any aggregator except my own; if anyone
> has a problem, please tell me.
>
> The (slight) downside of this is that if your browser knows how to
> read RSS (or dispatch it to another program that does), it has to do
> one of two things;
>   a) know to put 'application/rss+xml' in the Accept header, with a
>      higher q value than 'text/html' (or just omit the Accept header)
>   b) pass the URI to the helper app, which makes the request
>      itself
>
> I think this is manageable.
>
> --
> Mark Nottingham
> http://www.mnot.net/
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>