Re: Content negotiation

Jon Knight ([email protected])
Thu, 9 Nov 1995 02:40:33 +0000 (GMT)


On Wed, 8 Nov 1995, segmentation fault wrote:
> If the requested url happens
> to be something like http://a.b.com/x.html, the chances of
> this resource being, say, a JPEG are pretty slim it seems to me.
> So the browser requests x.html, and while doing the layout it
> comes across: <img src="b.gif"> So what is this? Do we need
> to send a 2K Accept: list for this resource as well? Don't we
> know before the request that this is most likely a GIF file?

No we don't; the part of the URL after the schemename, host and port is
supposed to be opaque to the browser.

> Now, as much as I dislike suggesting it, perhaps one "fix"
> for content negotiation is in the HTML itself, since filename
> extensions such as ".gif" don't necessarily give the right
> information especially when server alias mechanisms are taken
> into account. Perhaps something like
> <img src="c.xyz" mimetype="image/jpeg"> would give the browser
> the information it needs to determine whether it can display
> this resource, or what additional types it should request:

This seems like a good idea to me, especially if you could do things like:

<A HREF="blah" MIMETYPE="text/*">doodle</A>

and then get the browser to return all the Accept headers it can generate
for the text/* types. It also seems to fit in nicely with the way that
some servers are capable of delivering different versions of the same
basic resource in different formats based on the Accept headers.

Jon

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jon Knight, Researcher, Sysop and General Dogsbody, Department of Computer
Studies, Loughborough University of Technology, Leics., ENGLAND. LE11 3TU.
* I've found I now dream in Perl. More worryingly, I enjoy those dreams. *