Skip to content

Commit

Permalink
Fix paul's remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Oct 1, 2017
1 parent 91e6f38 commit b02437a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lighthouse-core/audits/uses-rel-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class UsesRelPreloadAudit extends Audit {
return {
category: 'Performance',
name: 'uses-rel-preload',
description: 'Critical resources that are discovered late can be preloaded to fetch them' +
'earlier.',
description: 'Preload key requests',
failureDescription: 'Scripts were discovered late but fetching them earlier may have ' +
'improved how quickly the page was interactive',
helpText: 'Consider using <link rel=preload> to prioritize fetching late-discovered ' +
Expand Down Expand Up @@ -96,19 +95,6 @@ class UsesRelPreloadAudit extends Audit {
];
const details = Audit.makeTableDetails(headings, results);

let debugString = null;
if (results.length > 0) {
if (results.length === 1) {
debugString = `${URL.getURLDisplayName(results[0].url)} was discovered late but ` +
`fetching it earlier may have improved how quickly the page was interactive ` +
Util.formatMilliseconds(totalWastedMs);
} else {
debugString = `${results.length} scripts were discovered late but fetching it ` +
`earlier may have improved how quickly the page was interactive ` +
Util.formatMilliseconds(totalWastedMs);
}
}

return {
score: UnusedBytes.scoreForWastedMs(totalWastedMs),
rawValue: totalWastedMs,
Expand All @@ -117,7 +103,6 @@ class UsesRelPreloadAudit extends Audit {
value: results,
},
details,
debugString,
};
});
}
Expand Down

0 comments on commit b02437a

Please sign in to comment.