New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 698520 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[preload] Ignore empty `as` values and support `fetch` as values

Project Member Reported by y...@yoav.ws, Mar 4 2017

Issue description

Chrome Version: M58
OS: all

Following https://github.com/w3c/preload/issues/80 we need to support `fetch` as a valid value for `as` and avoid fetching resources with an empty `as` value.
 

Comment 1 by addyo@chromium.org, Mar 29 2017

Cc: addyo@chromium.org
Cc: horo@chromium.org falken@chromium.org y...@yoav.ws
 Issue 715692  has been merged into this issue.
According to TestExpectations, this bug causes external/wpt/preload/fetch-destination.https.html to be flaky or fail.

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f18863cc9b2a5fe463671f3eb60de2f95bbf283

commit 1f18863cc9b2a5fe463671f3eb60de2f95bbf283
Author: yoav <yoav@yoav.ws>
Date: Sat Jun 03 00:20:44 2017

[preload] Mandatory `as` value and related spec alignments

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.

BUG= 726647 ,  715690 ,  698520 

Review-Url: https://codereview.chromium.org/2903653005
Cr-Commit-Position: refs/heads/master@{#476840}

[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-metadata-expected.txt
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/download-resources.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/onerror-event.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/onload-event.html
[add] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/reflected-as-value.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/opaque-response-preloaded-iframe.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/fast/dom/HTMLLinkElement/link-preload-validity.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/preload/link_header_preload_on_commit.php
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/preload/memcache_eviction.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/preload/memcache_reuse_of_non_cacheable_preload.html
[delete] https://crrev.com/37003a1722d89acc689cd3911efceb583bad43e0/third_party/WebKit/LayoutTests/http/tests/preload/onerror_event.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-preload-anonymous.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-preload-no-cors.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-preload-use-credentials.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/html/HTMLLinkElement.idl
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/loader/LinkLoader.cpp
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp

Comment 5 by y...@yoav.ws, Jun 3 2017

Status: Fixed (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52048521b06a253656579fc3a207a369a770d796

commit 52048521b06a253656579fc3a207a369a770d796
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Tue Oct 31 15:22:25 2017

wpt/preload/fetch-destination.https.html is no longer flaky

Bug:  698520 
Change-Id: I67a42c422103950bbec1805715f2384461ab118d
Reviewed-on: https://chromium-review.googlesource.com/746484
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512836}
[modify] https://crrev.com/52048521b06a253656579fc3a207a369a770d796/third_party/WebKit/LayoutTests/TestExpectations

Sign in to add a comment