W3C home > Mailing lists > Public > public-web-perf@w3.org > January 2018

Re: Using preload for "async" CSS by changing `rel` trick

From: Chris Harrelson <chrishtr@chromium.org>
Date: Thu, 18 Jan 2018 10:24:22 -0800
Message-ID: <CAOMQ+w9Y5fWGo-7tu1t0ZSofiODNskf8Xp7O6zznTkv4=H+qvw@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Ilya Grigorik <igrigorik@google.com>, Ben Maurer <ben.maurer@gmail.com>, Philip Walton <philipwalton@google.com>, Royi Hagigi <royi@fb.com>, "public-web-perf@w3.org" <public-web-perf@w3.org>
On Wed, Jan 17, 2018 at 11:53 PM, Anne van Kesteren <annevk@annevk.nl>
wrote:

> On Wed, Jan 17, 2018 at 7:56 PM, Chris Harrelson <chrishtr@chromium.org>
> wrote:
> > On Wed, Jan 17, 2018 at 2:36 AM, Anne van Kesteren <annevk@annevk.nl>
> wrote:
> >> Making the load event synchronous just if the style sheet happens to
> >> be in a cache seems like a bad API. You effectively change the API
> >> contract of <link> based on an externality.
> >
> > I see, ok. I think you're suggesting that the load event should be
> async. I
> > agree.
>
> Yes, but the thing is that the load event signals when we update the
> style sheet list and such too. So if you insert the element and the
> frame update happens to happen at the end of that task, you'll miss
> the frame.
>

Agreed. Perhaps the only way to fix that problem is to have a load API for
a detached style sheet, similar to image load/decode.


>
>
> --
> https://annevankesteren.nl/
>
Received on Thursday, 18 January 2018 18:25:06 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 18 January 2018 18:25:07 UTC