The composition of a typical web page often amasses several different files, CSS, JS and HTML – these instructions for the site can often harbour unnecessary code which creates drag when rendering a page. A process called minification is a simplistic method of using only the required code. An example, or analogy I guess, is if you dial into a company and get put into an automated “press 1 for”, for a lot of people 90% of the options aren’t viable – this process can be likened to creating a number for each department and when people call to get put straight through – there is no offering of other departments, resources and no lag in hearing all the options. Yep, the way my brain works firmly suits me as an SEO freelancer….
The minification process typically looks at elements like removing unnecessary files which are not needed on this particular page, squeezing the file size by removing redundant files or code, eliminating spaces and looking for formatting and comment removals – effectively tweaking the files to be lean without impacting the final page.
The amount of tools available for you to pinpoint if this is an issue on your site is extensive, ranging from automated SEO crawling software to hone in on a specific page. Let’s start with the crawlers, you can run a SEMRush, ahrefs, Screaming Frog or SiteBulb crawl on the site which will often highlight key files which are problematic. They often look for the same file which is served on all pages – with no adaptation to the page itself. The second option, and a more manual side of identifying this, is via the Google Developer Console in Chrome – this resource tab will indicate the % of code used on the site vs. what is in there. There is a secondary problem sometimes with minification, especially if you rely on third-party automation plugins to minify for you – that’s you run the risk of the code not working properly. So always ensure any minification work you do on the site is validated and supports the website loading speed efforts overall and doesn’t hinder it – as missing files can cause some issues (they often rename the files post-minification).
Website loading speed is certainly a major factor for ranking and fixing Unminified assets can go a long way. You do have several options, the preferred is getting a developer to assess the site, and tweaking the code where required, this can ensure any code changes are relevant and there is a low risk of removing code which is relied upon. The second option is using automated tools, often a plugin with WordPress through to minification services from CDNs like Cloudflare. They are often gentle when minifying files and look to squeeze performance with code that won’t impact performance – such as white space, it’s important to always validate any automated fixes (and developer fixes for that matter) that it doesn’t impact the functionality or aesthetics of the site.
Occasionally you may run into problems whereby you use a third-party tracking code, sometimes this can be flagged as using Unminified code. You will often have very little control over this but I’d raise it with the platform that gave you that code, if they reference Unminified files it’ll certainly impact your site.
When deploying code it’s important to always check it’s minified – this can include adding third party tags, new plugins or new pages. I’d also incorporate any frequent SEO crawling of your site that will assess the assets individually and flag any problems – as part of this audit I’d also recommend pulling maybe 5-10 pages randomly each month and running them through Lighthouse or Google Page Speed testing tool, to see if they spot any. Deployment of new code can often trip people up – even if you are asking developers to push minor changes, it can throw the minification out of sync if they are overriding or deploying code which isn’t minified. The good news is, that often the savings on minification are very small so any deviation shouldn’t cause too much of an issue but over time can present as a big opportunity – it’s worth the time to resolve but not the time obsessing over it as gains are usually tiny if your site is in good shape.
Additional points on minification / Unminified assets
- Always play it safe with large sites, sometimes you can minify assets which impact pages in a completely different part of the site, so try looking for safe quick wins.
- WordPress is notorious for bloated scripts, I do provide a dedicated WordPress SEO service that looks at these types of issues, the CMS often pushes scripts on all pages when it’s just required on one, such as contact forms.
- You are often talking about tiny wins with minification on a file by file basis but if your site is bloated there is a big opportunity collectively, usually.
- Developer input is always encouraged; also ensure your backups are regular too and that the native files are stored for safekeeping.
- Always ensure you are referencing the new minified file if you change the name, also try and remove the ?v version to help with caching for further enhancements to website loading speed.