-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core(preload): remove blob protocol from preload audit #5409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise :)
@@ -196,6 +196,36 @@ describe('Performance: uses-rel-preload audit', () => { | |||
}); | |||
}); | |||
|
|||
it(`shouldn't suggest preload for protocol blob`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this test fail without the fix? seems like it wouldn't have wastedMs anyhow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe let's just leave a TODO to make creating fake lantern graphs easier, it's inline with the other tests in the file for now
@@ -159,7 +159,8 @@ class UsesRelPreloadAudit extends Audit { | |||
/** @type {Set<string>} */ | |||
const urls = new Set(); | |||
for (const networkRecord of criticalRequests) { | |||
if (!networkRecord._isLinkPreload && networkRecord.protocol !== 'data') { | |||
if (!networkRecord._isLinkPreload && networkRecord.protocol !== 'data' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this to an array in url-shim?
NON_NETWORK_PROTOCOLS
or something?
There's a few audits where we're checking these individually and i think we can generalize it.
8ee0e61
to
0056e7a
Compare
Summary
Removes the blob protocol of preload requests like we do for data
Related Issues/PRs
Fixes #5380