17 views
Skip to first unread message

Gérald Farrow

unread,
May 18, 2017, 5:28:27 PM5/18/17
to A...@psav.com

Can we discuss now ?

Yoav Weiss

unread,
May 26, 2017, 5:49:46 AM5/26/17
to blink-dev, Ilya Grigorik, Domenic Denicola, Anne van Kesteren

Intent to Implement and ship: Mandatory `as` value for link rel preload

 

Body:

 

Contact emails

yo...@yoav.ws / ywe...@akamai.com

 

Spec

Related spec discussions:

https://github.com/w3c/preload/issues/80

https://github.com/whatwg/fetch/pull/547

https://github.com/whatwg/fetch/pull/549

https://github.com/whatwg/html/pull/2588

 

As this is a fairly small change to the API's surface, I don't think a TAG review is required, but let me know if you think otherwise.

 

Summary

Align the preload implementation to the spec on 3 fronts:

  • Avoid fetching a resource if `as` is missing or empty.
  • Avoid triggering an error event if `as` is invalid, missing or empty.
  • Properly reflect only a limited set of known values for `as`. 

Motivation

The motivation for this change is to avoid double downloads following developer confusion around empty `as` values, enable feature detection of supported `as` values, and simplify the HTML processing model. Details below:

  • Avoid fetching a resource if `as` is missing - we've seen many cases where developers omit the `as` value from their preload links, which often results in double downloads. We've also had developer feedback that an empty `as` value being mapped to XHR/fetch() feels magical. This change addresses that, by defining a "fetch" value for these cases and ignoring empty/missing `as` values.
  • Properly reflect a limited set of known `as` values - enable feature detection of supported `as` values (instead of the `onerror` based fallback, which we're deprecating.
  • Avoid triggering the "onerror" event when an invalid `as` value is encountered - simplify HTML's processing model.

 

Interoperability and Compatibility Risk

Interoperability risk is low, and I intend to implement similar changes in WebKit, and Firefox were part of the related spec discussions and are supportive of this change.


Compatibility risk is low. This is changing the behavior of a shipped feature, but:

  • Usage of onerror with preload (which we're removing here) is 0 when querying the HTTP archive.
    • Thanks to igrigorik@ for improving & running that query! :)
  • Almost all usage I've seen where people omit the `as` directive today is erroneous and likely to result in a double download. On top of that, preloading XHR and fetch() is riddled with issues at the moment, so breaking such preloads is likely to result in performance improvements until said issues are fixed.
  • It's unlikely that developers rely on our erroneous `as` reflection at the moment. 

Edge: No signals

Firefox: In development

Safari: In development

Web developers: Positive

 

Ongoing technical constraints

None.

 

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.

 

OWP launch tracking bug

crbug.com/726647

CL & WPT tests are at https://codereview.chromium.org/2903653005/

 

Link to entry on the feature dashboard

This is a small change to the API surface so I don't think a dedicated entry is required.

 

Requesting approval to ship?

Yes, please! :)


Yoav Weiss

unread,
May 26, 2017, 5:53:09 AM5/26/17
to blink-dev, Ilya Grigorik, Domenic Denicola, Anne van Kesteren
sent again with the right title :/ Please ignore this thread

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEgytGfpk_vw%3Dw_yx9LEHxiy59CM9COyq%3DuaaEq_nuFHcg%40mail.gmail.com.

Maurer, Thomas Paul

unread,
May 31, 2017, 7:22:02 AM5/31/17
to in...@mac.com

I am Mrs. Edvin Cynthia, a devoted Christian. I have a foundation/Estate uncompleted {valued at USD 3,142,728.00 Dollars} and need you to help me finish it because of my health, everything is available. Please contact me for more details with my Private email: @( s860...@gmail.com) thank you.

Reply all
Reply to author
Forward
0 new messages