Skip to main content

Pages with Unminified JS

Priority: Critical

Impact: Neutral

What issues it may causeโ€‹

Failure to minify JavaScript files can result in larger file sizes, leading to longer download times and slower page load speeds. This can negatively impact user experience, particularly for users on slower network connections or devices with limited bandwidth. Additionally, larger file sizes increase the load on servers and consume more network bandwidth, potentially leading to higher hosting costs and reduced server performance.

How do you fix itโ€‹

Minify JavaScript files before deploying them to your website. Minification tools remove unnecessary whitespace, comments, and other characters from JavaScript files, reducing their size without affecting functionality. Popular minification tools include UglifyJS, Terser, and Google's Closure Compiler.

Automate the minification process as part of your build or deployment pipeline to ensure that JavaScript files are minified consistently and efficiently.

What is the positive impactโ€‹

  • Faster page load times and improved overall performance, leading to a better user experience and higher user satisfaction.

  • Reduced data transfer times and bandwidth usage, resulting in lower hosting costs and improved server efficiency.

How to fetch the data for this report templateโ€‹

You will need to run a crawl for report template to generate report. When report has been generated and you have crawl id you can fetch data for the report using the following query:

query GetReportForCrawl($crawlId: ObjectID!, $reportTemplateCode: String!) {
getCrawl(id: $crawlId) {
reportsByCode(
input: {
reportTypeCodes: Basic
reportTemplateCodes: [$reportTemplateCode]
}
) {
rows {
nodes {
... on CrawlSiteSpeedAudits {
url
auditId
title
displayValue
savingsKib
pageviews
productOfSavingsKibAndPageviews
itemsCount
auditResult
}
}
}
}
}
}

Try in explorer