W3C home > Mailing lists > Public > public-html@w3.org > July 2008

Re: [whatwg] Handling of HTTP response codes for <embed>, was: <embed> feedback

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 24 Jul 2008 08:39:41 +0000 (UTC)
To: Julian Reschke <julian.reschke@gmx.de>
Cc: "public-html@w3.org" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0807240828580.10853@hixie.dreamhostps.com>

On Thu, 24 Jul 2008, Julian Reschke wrote:
> Ian Hickson wrote:
> > On Sun, 7 May 2006, Simon Pieters wrote:
> > > > I think for <img> you want to only support image/* types (e.g. not
> > > > text/plain or text/html, not sure about image/svg+xml either, since
> > > > there is no difference between that and application/xhtml+xml); and you
> > > > want to only show them for 200 (or 301-200).
> > > > [...]
> > > > For <embed> you want to show only things that require plugins, and only
> > > > if they have 200 (or 301-200) responses.
> > > The only browser to my knowledge that only support 200 (or 301-200)
> > > responses for <img> and <embed> is IE5/Mac. Safari, Opera, Mozilla and IE
> > > all load the resourse for <img> and <embed> regardless of the response.
> > > (In the real world it works fine because error responses are normally
> > > text/html.)
> > 
> > This is now what <img> and <embed> say.
> 
> That doesn't sound good. Is there any research on for how much of the 
> consisting content this is needed?

For <img>, it's actually the right thing to do -- just like with how 
browsers show the HTML of an error message when you visit a page that 
returns 4xx or 5xx, when an <img> element points to a resource that is 4xx 
or 5xx, a lot of servers actually return the error message as an image and 
want it displayed. Typical example: 403 Stop Stealing My Bandwidth images 
sent back when the Referer header isn't right.

For <embed>, consistency with <img> and compatibility with legacy UAs is 
probably enough of an argument to do it (that, at least, is why I changed 
it to say this earlier today). One could imagine the same argument being 
made here. Why would it be better to show a generic error message than 
show the content, if appropriate content is sent along with the 4xx/5xx 
code? Seems to me more consistent with how the rest of the platform works 
to just show the error message from the server. That's what top-level 
browsing contexts do, it's what <img> and <iframe> do, etc.

By the way, please don't cc both whatwg and public-html at the same time. 
I don't mind which list messages go to, but sending messages to both means 
that people who are on only one list will see fragmented threads.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 24 July 2008 08:40:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:19 GMT