➡️ Identify And Remove Dead Code In Websites For ⚡ Faster Page Load

RealDaddy

Repeatedly violating rules
Joined
Jun 30, 2018
Messages
9,017
Reaction score
11,294
coverage-report-in-chrome-for-seo.gif

When you are doing Technical SEO Audits, it’s a good idea to check if the CSS and JS code called on the page is actually being used on those pages.

You will usually find that there is a lot of extra code that is not used on the page that you can safely remove to improve the performance of your web page. There is a feature in Chrome ( introduced in https://developers.google.com/web/updates/2017/04/devtools-release-notes ) called coverage report that helps you with this.

How to use coverage report in Chrome for SEO​

  1. https://developers.google.com/web/tools/chrome-devtools/
  2. Select the three vertical dots near the close button.
  3. Look for More tools >> Coverage.
  4. Click on the Reload icon.
  5. You can now see the % of unused CSS and JS in the loaded files, you can click on one of them and it will show you the used and unused lines of code in green and red, respectively.
 
This works great for reskinning landing pages. We can remove all the dead code after customization.
 
This works great for reskinning landing pages. We can remove all the dead code after customization.

That would be the only case to do this.
For a whole website that is continuously being updated it would be risky to touch the code unless you know to the T what you are doing.
 
That would be the only case to do this.
For a whole website that is continuously being updated it would be risky to touch the code unless you know to the T what you are doing.
I agree with it. I wouldn't mess with a fully functional dynamic website with such tricks. This is only good for static sites.
 
Back
Top