diff --git a/front/src/views/rule.html b/front/src/views/rule.html index 7961171..7effe8b 100644 --- a/front/src/views/rule.html +++ b/front/src/views/rule.html @@ -409,27 +409,6 @@ -
Try to inline these styles in the head of the HTML or to merge them with other files.
-Try to inline these scripts in the HTML or merge them with other files.
-Try to inline these images (with base64 encoding for most image types except SVG that don't need base64 encoding). You can also create sprites.
-List of all requests that are less than 2 KB. Try to merge them with other files.
", - "isOkThreshold": 20, - "isBadThreshold": 60, - "isAbnormalThreshold": 90, - "hasOffenders": true - }, "lazyLoadableImagesBelowTheFold": { "tool": "phantomas", "label": "Below the fold images", diff --git a/lib/metadata/scoreProfileGeneric.json b/lib/metadata/scoreProfileGeneric.json index 64a00ee..953b2f8 100644 --- a/lib/metadata/scoreProfileGeneric.json +++ b/lib/metadata/scoreProfileGeneric.json @@ -18,7 +18,6 @@ "notFound": 3, "identicalFiles": 2, "emptyRequests": 3, - "smallRequests": 0.5, "lazyLoadableImagesBelowTheFold": 2, "hiddenImages": 1 } diff --git a/lib/tools/redownload/redownload.js b/lib/tools/redownload/redownload.js index 0876272..f7169c3 100644 --- a/lib/tools/redownload/redownload.js +++ b/lib/tools/redownload/redownload.js @@ -137,7 +137,7 @@ var Redownload = function() { offenders.emptyRequests = listEmptyRequests(results); metrics.emptyRequests = offenders.emptyRequests.length; - // Now remove unwanted responses (redirections and empty files) + // Remove some more unwanted responses (redirections and empty files) results = results.filter(function(result) { return (/* (result.status < 300 || result.status >= 400) && */ result.weightCheck.bodySize > 0); }); @@ -158,10 +158,6 @@ var Redownload = function() { offenders.compression = listFilesNotBrotlified(results); metrics.compression = offenders.compression.totalGain; - // Small requests - offenders.smallRequests = listSmallRequests(results); - metrics.smallRequests = offenders.smallRequests.total; - // Detect identical files offenders.identicalFiles = listIdenticalFiles(results); metrics.identicalFiles = offenders.identicalFiles.avoidableRequests; @@ -538,31 +534,6 @@ var Redownload = function() { return results; } - function listSmallRequests(requests) { - var results = { - total: 0, - byType: { - css: [], - js: [], - image: [] - } - }; - - requests.forEach(function(req) { - if (req.weightCheck.bodySize > 0 && req.weightCheck.bodySize < 2048) { - if (req.isCSS || req.isJS || req.isImage) { - results.byType[req.type].push({ - url: req.url, - size: req.weightCheck.bodySize - }); - results.total ++; - } - } - }); - - return results; - } - function listIdenticalFiles(requests) { var hashes = {}; var list = []; diff --git a/test/core/redownloadTest.js b/test/core/redownloadTest.js index 9c200be..c1964b4 100644 --- a/test/core/redownloadTest.js +++ b/test/core/redownloadTest.js @@ -108,12 +108,6 @@ describe('redownload', function() { data.toolsResults.redownload.offenders.totalRequests.byType.video.length.should.equal(0); data.toolsResults.redownload.offenders.totalRequests.byType.other.length.should.equal(1); - data.toolsResults.redownload.metrics.should.have.a.property('smallRequests').that.equals(0); - data.toolsResults.redownload.offenders.should.have.a.property('smallRequests'); - data.toolsResults.redownload.offenders.smallRequests.byType.js.length.should.equal(0); - data.toolsResults.redownload.offenders.smallRequests.byType.css.length.should.equal(0); - data.toolsResults.redownload.offenders.smallRequests.byType.image.length.should.equal(0); - done(); })