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

Issue 646797 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Unused preloads should be reported to developers

Project Member Reported by y...@yoav.ws, Sep 14 2016

Issue description

Version: M55
OS: All

What steps will reproduce the problem?
(1) Add <link rel=preload> based resource to your page, without using the resource.

What is the expected output?
The curious developer gets a warning indicating that a resource was loaded, probably for no good reason.
 
What do you see instead?
No warning



 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 21 2016

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

commit 4fcc2d6bfddd9592403148e752620a987d1c15ae
Author: yoav <yoav@yoav.ws>
Date: Wed Sep 21 09:14:35 2016

Add a warning whenever link preloads are not used

This CL adds a console warning if 3 seconds after the page's onload,
there are still preloaded resources that were not used.

BUG= 646797 

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

[add] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/LayoutTests/fast/dom/HTMLLinkElement/link-preload-unused-expected.txt
[add] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/LayoutTests/fast/dom/HTMLLinkElement/link-preload-unused.html
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/fetch/FetchContext.cpp
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/fetch/FetchContext.h
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/4fcc2d6bfddd9592403148e752620a987d1c15ae/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h

Comment 2 by y...@yoav.ws, Sep 21 2016

Status: Fixed (was: Started)

Sign in to add a comment