[rel=preload] Log a warning when preloaded resources are not used
Categories
(DevTools :: Netmonitor, enhancement, P1)
Tracking
(firefox79 fixed)
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: Harald, Assigned: mayhemer)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [necko-triaged])
Attachments
(3 files, 1 obsolete file)
Suggestion from rel=”preload” performance consultation.
Chrome warns on 3sec but maybe a network-dependent threshold might adapt better to slow connections.
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Related, this would also be a useful warning to show in Network panel.
Assignee | ||
Comment 2•5 years ago
|
||
Moving to the right component. Necko parts to provide the information can be done here or in a separate bug.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
|
||
Not sure if we should/could do this in the same bug, but it would be good to have this holistically 1) as console warning and 2) as notification for a request to show a warning flag on the request in the Network panel.
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to :Harald Kirschner :digitarald from comment #4)
Not sure if we should/could do this in the same bug, but it would be good to have this holistically 1) as console warning and 2) as notification for a request to show a warning flag on the request in the Network panel.
Because of a time press, I will only write a patch for console warning.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D76527
Comment 9•4 years ago
|
||
Comment 10•4 years ago
|
||
Backed out 2 changesets (Bug 1603542) for causing assertion failures in Loader.cpp CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306654091&repo=autoland&lineNumber=4415
Backout: https://hg.mozilla.org/integration/autoland/rev/d1d6796032884359c2e92592ea8e84f75f27b9fe
Assignee | ||
Comment 11•4 years ago
|
||
Emilio, this used to work, can you please look at it or guide me what to do?
(see the previous comment)
Comment 12•4 years ago
|
||
So here's a reduced test-case for example:
<!doctype html>
<link rel=preload href=a.css>
<link rel=stylesheet href=b.css>
<script>
console.log("foo");
</script>
<link rel=stylesheet href=a.css>
<div>Foo</div>
(Neither a.css or b.css need to exist)
The issue is that we don't store sheets in the cache if the load failed. We could change it, but other than that I think that the best option for now is removing the assertion. A bit sad :/
Comment 13•4 years ago
|
||
For the record, this is the stylesheet that's failing to load: https://searchfox.org/mozilla-central/rev/eef39502e08bcd3c40573c65a6827828dce4a032/toolkit/content/plugins.html#12
Because a FILE_NOT_FOUND error, which is expected afaict (we have just one, and it's chrome://global/content/plugins.css
)
Assignee | ||
Comment 14•4 years ago
|
||
Thanks, Emilio. I will remove that assertion then and also incorporate your followup patch in my patch (to save some merging).
Updated•4 years ago
|
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/754e4ddef9b9
https://hg.mozilla.org/mozilla-central/rev/990dce4af7cf
Reporter | ||
Updated•4 years ago
|
Description
•