Skip to content
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

Merged
merged 4 commits into from Jul 11, 2018

Conversation

wardpeet
Copy link
Collaborator

@wardpeet wardpeet commented Jun 2, 2018

Summary
Removes the blob protocol of preload requests like we do for data

Related Issues/PRs
Fixes #5380

Copy link
Collaborator

@patrickhulce patrickhulce left a 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`, () => {
Copy link
Collaborator

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

Copy link
Collaborator

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'
Copy link
Member

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.

@patrickhulce patrickhulce merged commit 82505a1 into master Jul 11, 2018
@patrickhulce patrickhulce deleted the bug/preload-blob-video branch July 11, 2018 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preload key requests potential bug. Suggestion of preloading lighthouse blob: document
3 participants