Re: @type attribute on <source> elements

I apologise because I think I must be missing something here.... I'm
wondering why we're worrying about the type at all.

When HTML5 application cache arrived we didn't need to include anything for
the browser to understand the file, we did this at the apache level and let
the browser take care of it in a way that it was design to.  By adding
these additional attributes it's confusing the situation.



On Mon, Sep 10, 2012 at 5:48 PM, Andy Davies <dajdavies@gmail.com> wrote:

> On 6 September 2012 22:21, Nathanael D. Jones <nathanael.jones@gmail.com>
> wrote:
> > I'm starting a new thread about the @type attribute, as requested by
> Adrian
> > Roselli.
> >
> > I believe it is critical that we REQUIRE browsers to SKIP source elements
> > which have an unrecognized (or unsupported) mime-type value in the @type
> > attribute.
> >
> > Otherwise, we will not be able to introduce to formats and simplify
> > <picture> in the future.
> >
> > @type should be an OPTIONAL attribute, not required, but if present,
> > browsers should handle it in a specific way. Widely supported formats
> like
> > jpeg, png, and gif do not need a type="" attribute, but webp and future
> > formats do.
> >
> > This will allow us to introduce new image formats in a
> backwards-compatible
> > manner.
> >
>
> I'm still wondering how relevant type really is...
>
> Yes it make sense when the element has a src but once srcset is used
> doesn't it open up a can of worms as the images in a srcset may not
> all be the same mimetype, for example, what should the type be for the
> following element?
>
> <img src="img.png" srcset="srcset="image.jpg 1x, image-x2.webp, #000" />
>
> I can think of several possibilities but do any of them make sense?
>
> Cheers
>
> Andy
>
>


-- 
Justin Avery

*We Build Websites*
http://justinavery.me
http://www.twitter.com/justinavery

Received on Monday, 10 September 2012 09:56:32 UTC