Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

APNG and Accept-Encoding

473 views
Skip to first unread message

Mike Lawther

unread,
Feb 17, 2016, 11:35:31 PM2/17/16
to dev-pl...@lists.mozilla.org
Hi Mozilla developers!

tl,dr; can Firefox send an Accept-Encoding heading for APNG?

I'm an engineer at Google working on Chrome. We're considering support for
APNG.

To support APNG, we think it's important for web developers (including for
example CDN operators) to be able to decide server-side what content to
ship. We want to send an Accept-Encoding header. This would be for whatever
MIME type APNG ends up with, but that's another topic. The latest I've seen
on this is "vnd.mozilla.apng" (https://bugzilla.mozilla.org/
show_bug.cgi?id=1160200).

If Chrome does decide to support APNG, it would be ideal for both our
browsers to be compatible in this respect as well.

Is this something we can coordinate on?

thanks,

Mike Lawther

Mike Hommey

unread,
Feb 17, 2016, 11:39:40 PM2/17/16
to Mike Lawther, dev-pl...@lists.mozilla.org
I don't have anything to bring to the table on this particular topic,
but I want to point out that Safari supports APNG too, so you'll want to
coordinate with Apple too.

Mike

Anne van Kesteren

unread,
Feb 18, 2016, 3:21:19 AM2/18/16
to Mike Lawther, dev-platform
On Thu, Feb 18, 2016 at 12:08 AM, Mike Lawther <mikel...@chromium.org> wrote:
> Is this something we can coordinate on?

Do you mean the Accept header? Not sure how Accept-Encoding makes sense here.

As for the MIME type to mention there, as I said in the bug I think we
should just ship image/apng (or video/apng though that seems a little
weird given the precedence set by GIF). Using the vnd tree makes no
sense for a format supported by multiple parties.


--
https://annevankesteren.nl/

Jeff Muizelaar

unread,
Feb 18, 2016, 9:45:57 AM2/18/16
to Mike Lawther, Mozilla
Is there a response to the criticism of Accept outlined here:
https://wiki.whatwg.org/wiki/Why_not_conneg#Negotiating_by_format

-Jeff

On Wed, Feb 17, 2016 at 6:08 PM, Mike Lawther <mikel...@chromium.org> wrote:
> Hi Mozilla developers!
>
> tl,dr; can Firefox send an Accept-Encoding heading for APNG?
>
> I'm an engineer at Google working on Chrome. We're considering support for
> APNG.
>
> To support APNG, we think it's important for web developers (including for
> example CDN operators) to be able to decide server-side what content to
> ship. We want to send an Accept-Encoding header. This would be for whatever
> MIME type APNG ends up with, but that's another topic. The latest I've seen
> on this is "vnd.mozilla.apng" (https://bugzilla.mozilla.org/
> show_bug.cgi?id=1160200).
>
> If Chrome does decide to support APNG, it would be ideal for both our
> browsers to be compatible in this respect as well.
>
> Is this something we can coordinate on?
>
> thanks,
>
> Mike Lawther
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform

Gervase Markham

unread,
Feb 18, 2016, 3:57:29 PM2/18/16
to Jeff Muizelaar, Mike Lawther
On 18/02/16 07:45, Jeff Muizelaar wrote:
> Is there a response to the criticism of Accept outlined here:
> https://wiki.whatwg.org/wiki/Why_not_conneg#Negotiating_by_format

As Guardian of the Accept Header, that would be my question too.

Using Accept to detect APNG support will never be reliable because not
everyone who has shipped it sends the header. So you have to detect
support by sniffing anyway. So what does Accept give you, other than the
promise of perhaps being able to rely on it in 10 years time if nothing
else goes wrong?

Gerv

Mike Lawther

unread,
Feb 19, 2016, 10:36:59 AM2/19/16
to Mike Hommey, dev-pl...@lists.mozilla.org
On 18 February 2016 at 15:38, Mike Hommey <m...@glandium.org> wrote:

> On Thu, Feb 18, 2016 at 10:08:12AM +1100, Mike Lawther wrote:
> > Hi Mozilla developers!
> >
> > tl,dr; can Firefox send an Accept-Encoding heading for APNG?
> >
> > I'm an engineer at Google working on Chrome. We're considering support
> for
> > APNG.
> >
> > To support APNG, we think it's important for web developers (including
> for
> > example CDN operators) to be able to decide server-side what content to
> > ship. We want to send an Accept-Encoding header. This would be for
> whatever
> > MIME type APNG ends up with, but that's another topic. The latest I've
> seen
> > on this is "vnd.mozilla.apng" (https://bugzilla.mozilla.org/
> > show_bug.cgi?id=1160200).
> >
> > If Chrome does decide to support APNG, it would be ideal for both our
> > browsers to be compatible in this respect as well.
> >
> > Is this something we can coordinate on?
>
> I don't have anything to bring to the table on this particular topic,
> but I want to point out that Safari supports APNG too, so you'll want to
> coordinate with Apple too.
>
> Yes, totally.

maxs...@gmail.com

unread,
Feb 21, 2016, 9:30:09 AM2/21/16
to
Here's interesting live example, this website provides lots of animated cursors to download, and they show them online as APNGs in Firefox and Safari, and as GIFs in other browsers. Cursor's ANI format is 32bit and animated, but it's not supported by browsers, so they have to convert.

One such set:
http://www.rw-designer.com/cursor-set/blue-white-reloaded

I think they decide server-side.

Max.

Gervase Markham

unread,
Feb 22, 2016, 9:26:28 AM2/22/16
to
If they show them as APNGs in Firefox, that means they are not using the
Accept: header to choose what to send. If Firefox started sending an
Accept: value for APNG, they would continue to need to sniff server-side
anyway, in order to support older Firefoxes.

Gerv


Xidorn Quan

unread,
Feb 22, 2016, 10:05:17 AM2/22/16
to Gervase Markham, dev-pl...@lists.mozilla.org
But older Firefoxes go away fairly quickly, so I wouldn't consider
this as a valid reason blocking us moving forward.

- Xidorn

Mike Lawther

unread,
Feb 23, 2016, 8:56:44 AM2/23/16
to Mozilla
[I joined the list and posted this again, I think the previous one got
trapped in moderation]

---------- Forwarded message ----------
From: Mike Lawther <mikel...@chromium.org>
Date: 19 February 2016 at 17:52
Subject: Re: APNG and Accept-Encoding
To: Jeff Muizelaar <jmuiz...@mozilla.com>
Cc: Mozilla <dev-pl...@lists.mozilla.org>


Sorry, I did mean Accept, not Accept-Encoding. My bad - those two always
hash collide in my head for some reason :/

On 19 February 2016 at 01:45, Jeff Muizelaar <jmuiz...@mozilla.com> wrote:

> Is there a response to the criticism of Accept outlined here:
> https://wiki.whatwg.org/wiki/Why_not_conneg#Negotiating_by_format
>
>
A lot of the criticism there is essentially 'you can't rely on it, because
not everybody sends it'.

It's a fair question. And it's a large reason why I'm asking the question I
did :) If we can coordinate on this then it becomes more reliable.

Our experience with WebP and things such as data compression proxies is
that it does get used. In this use case, the end user gets identical
behaviour, but it has cost them less in network bandwidth. The CDN use case
is similar. The data cost reduction is significant in a lot of markets. And
in these use cases, it doesn't matter if the header is not sent by every
browser. The users of ones that do get a benefit.

I'm testing the water here :) Is this at all likely to fly?

thanks,

mike


> -Jeff
>
> On Wed, Feb 17, 2016 at 6:08 PM, Mike Lawther <mikel...@chromium.org>
> wrote:
> > Hi Mozilla developers!
> >
> > tl,dr; can Firefox send an Accept-Encoding heading for APNG?
> >
> > I'm an engineer at Google working on Chrome. We're considering support
> for
> > APNG.
> >
> > To support APNG, we think it's important for web developers (including
> for
> > example CDN operators) to be able to decide server-side what content to
> > ship. We want to send an Accept-Encoding header. This would be for
> whatever
> > MIME type APNG ends up with, but that's another topic. The latest I've
> seen
> > on this is "vnd.mozilla.apng" (https://bugzilla.mozilla.org/
> > show_bug.cgi?id=1160200).
> >
> > If Chrome does decide to support APNG, it would be ideal for both our
> > browsers to be compatible in this respect as well.
> >
> > Is this something we can coordinate on?
> >

Anne van Kesteren

unread,
Feb 23, 2016, 9:15:07 AM2/23/16
to Mike Lawther, Mozilla
On Tue, Feb 23, 2016 at 12:37 AM, Mike Lawther <mikel...@chromium.org> wrote:
> I'm testing the water here :) Is this at all likely to fly?

I think the problem with APNG, as opposed to other image formats,
e.g., WebP, is that we already support it. If we added APNG to our
Accept header now, and developers would start relying on that, users
that haven't updated yet or are on Firefox ESR would suddenly get a
worse experience in Firefox. That is not a great incentive.


--
https://annevankesteren.nl/

Xidorn Quan

unread,
Feb 23, 2016, 9:48:29 AM2/23/16
to Anne van Kesteren, Mike Lawther, Mozilla
If we make the decision now, and make it happen immediately, and
uplift it to Beta 45, we would have the next ESR with this behavior
builtin... FWIW.

I don't know if people would be happy with this, though.

- Xidorn

maxs...@gmail.com

unread,
Feb 23, 2016, 1:50:27 PM2/23/16
to
What if, in the future:
1. Safari fully supports <picture>
2. This bug lands https://bugzilla.mozilla.org/show_bug.cgi?id=1160200

Then it would be possible for web-developers to just use this, right?

<picture>
<source type="image/vnd.mozilla.apng" srcset="animated.png" />
<img src="animated.gif" />
</picture>

Jonas Sicking

unread,
Feb 23, 2016, 2:56:11 PM2/23/16
to Anne van Kesteren, Mike Lawther, Mozilla
On Tue, Feb 23, 2016 at 6:14 AM, Anne van Kesteren <ann...@annevk.nl> wrote:
> On Tue, Feb 23, 2016 at 12:37 AM, Mike Lawther <mikel...@chromium.org> wrote:
>> I'm testing the water here :) Is this at all likely to fly?
>
> I think the problem with APNG, as opposed to other image formats,
> e.g., WebP, is that we already support it. If we added APNG to our
> Accept header now, and developers would start relying on that, users
> that haven't updated yet or are on Firefox ESR would suddenly get a
> worse experience in Firefox. That is not a great incentive.

It doesn't seem likely to me that developers would knowingly drop
support for some set of users that they already support.

It seems much more likely that some set of developers currently don't
bother supporting APNG in firefox, either because they worry that it's
a browser-specific dead-end technology, or because they feel that
there's not enough firefox users that it's worth their time, or
because it's too much of a pain to support due to lack of Accept
header.

The question to me is how large this latter group is, and if it's
large enough that it warrants adding the header.

/ Jonas

Alexander J. Salas B.

unread,
Feb 23, 2016, 11:12:37 PM2/23/16
to Jonas Sicking, Anne van Kesteren, Mike Lawther, Mozilla
In my last commercial project 2 month ago I used APNG in the iconography of
my Firefox Add-on.

Gervase Markham

unread,
Feb 25, 2016, 11:00:48 AM2/25/16
to
On 22/02/16 14:58, Xidorn Quan wrote:
> But older Firefoxes go away fairly quickly, so I wouldn't consider
> this as a valid reason blocking us moving forward.

I'm not sure that's as true as we'd like it to be :-|

Gerv

Jonas Sicking

unread,
Feb 29, 2016, 4:44:07 AM2/29/16
to Mike Lawther, Mozilla
On Sun, Feb 28, 2016 at 7:49 PM, Mike Lawther <mikel...@chromium.org> wrote:
> On Wed, Feb 24, 2016 at 6:56 AM Jonas Sicking <jo...@sicking.cc> wrote:
>>
>> On Tue, Feb 23, 2016 at 6:14 AM, Anne van Kesteren <ann...@annevk.nl>
>> wrote:
>> > On Tue, Feb 23, 2016 at 12:37 AM, Mike Lawther
>> > <mikel...@chromium.org> wrote:
>> >> I'm testing the water here :) Is this at all likely to fly?
>> >
>> > I think the problem with APNG, as opposed to other image formats,
>> > e.g., WebP, is that we already support it. If we added APNG to our
>> > Accept header now, and developers would start relying on that, users
>> > that haven't updated yet or are on Firefox ESR would suddenly get a
>> > worse experience in Firefox. That is not a great incentive.
>>
>> It doesn't seem likely to me that developers would knowingly drop
>> support for some set of users that they already support.
>>
>> It seems much more likely that some set of developers currently don't
>> bother supporting APNG in firefox, either because they worry that it's
>> a browser-specific dead-end technology, or because they feel that
>> there's not enough firefox users that it's worth their time, or
>> because it's too much of a pain to support due to lack of Accept
>> header.
>>
>> The question to me is how large this latter group is, and if it's
>> large enough that it warrants adding the header.
>>
> I don't really have a good answer for that. I can't think of how we (that
> is, browser devs) could gather data on this, other than going out and
> asking.
>
> Do you reckon that a world where multiple browsers correctly send Accept
> will be a good enough story that devs will feel it's not dead end / worth
> their time? And so helps solve the problem for all three of those groups,
> making figuring out the size of the latter less of a showstopper?

I think it'd be a while before website developers think it's worth
changing from UA-sniffing to using the Accept header. Mainly because
of inertia (the UA-sniffing code is already there and likely
documented in places like stackexchange), but also because switching
to Accept header only would actually drop users to very little
benefit.

> Aside - I mentioned the MIME type earlier as a separate question. If devs
> are worried that it's a browser specific dead end tech, having
> 'image/vnd.mozilla.apng' probably won't help that perception :( I've read
> the bug and also chatted offline with Stuart and Vlad about this, so I
> understand why 'image/apng' is almost certainly not going to happen.

I don't think the "vnd.mozilla" part makes any difference. Developers
use what works, not what is nicely named. The whole CSS prefixes
debacle has pretty clearly showed that.

/ Jonas

Mike Lawther

unread,
Feb 29, 2016, 10:04:52 AM2/29/16
to Jonas Sicking, Anne van Kesteren, Mozilla

maxs...@gmail.com

unread,
Mar 2, 2016, 8:05:22 AM3/2/16
to
I think now, in 2010s most of internet content is made by regular users, not webdevs. Can we look at the problem from their perspective? Of course, CDNs and webdevs care about MIME types and Accept headers, but regular users know nothing about that and they've been happily posting apngs to Tumblr and DeviantArt for years now:

http://patakk.tumblr.com/post/42213491263
http://kokotea.deviantart.com/art/AT-kia-animated-PNG-519985556
http://www.deviantart.com/art/Lifealope-293147967
http://apngden.tumblr.com/

They simply tell their visitors: "you can use Firefox, or click here for APNG extension for Chrome, or click here for the GIF version". Judging by the comments, viewers seems to figure it out quickly.

So what would happen if APNG support lands into Chrome "as is" and only IE/Edge is left out? These artistic types would keep posting that stuff, only a bit more often. What about CDNs and webdevs of big websites? Maybe a few of them would UA-sniff IE/Edge, but most won't bother they'll keep using GIFs. A few might switch to APNG exclusively, but that's hard to predict.

I think the net effect would be slightly positive.

And if Edge devs would follow soon enough, the whole thing could be moot, quickly. Three-way negotiations seems harder to achieve than convincing just one more player.

Max.
0 new messages