> Another workable solution I have found -- if you are using XML and will get
> criticized for making up MIME types -- is to expose the browser-friendly
> HTML variant by itself on a distinct URI (e.g. person.html).  That's sloppy
> too, just in a different way.

I think this might be a better and clear way than specifying content
type in the HTTP header. The book Restful web service also recommends
doing this. It is both friendly to browser client and programmatic
client.

On Tue, Feb 19, 2008 at 12:41 AM, Rob Heittman
<[EMAIL PROTECTED]> wrote:
>
> This legacy browser behavior is frustrating in the extreme.  Why in heaven's
> name would a tool meant primarily for viewing HTML, request XML as a higher
> quality representation?  Just goes to show how uber-excited everybody was
> about XML once upon a time.  You know, because in the future, all web pages
> will someday be XML with a reference to an XSL stylesheet, not HTML.
>
> Choosing a different MediaType for your XML, that the browser doesn't ask
> for, is the usual solution.
>

>
> Now, packaging your data with JSON instead of XML will avoid the issue
> altogether, without making up MIME types  =)
>
> - R
>
>
>
>
> On 2/18/08, Stephan Koops <[EMAIL PROTECTED]> wrote:
> > if a browser requests to a REST server, some browsers (Firefox and IE
> > for example, Opera not) requests text/xml and application/xml with a
> > higher quality than text/html.
>



-- 
Cheers,
Keke
-----------------
We paranoid love life

Reply via email to