Open In App

Find unused JS and CSS code in Microsoft Edge Browser

During the development of websites developers may leave some unused JS and CSS code in the production. These unused JS and CSS codes are being downloaded by the browser when the site is visited by the user and can result in slowing down the page loading time, increase in internet consumption or increase in memory consumption.

To detect unused JS and CSS code in Edge you can use Coverage tool. The Coverage tool is a simple tool used to get certain information about unused JS and CSS code in a particular webpage. We can get information such as URL of the code, Type of code(JS or CSS), Total bytes of the code , Unused Bytes of the code and the usage visualization.



How to Open Coverage Tool

To open Coverage tool follow these steps:

Step 1: First open developer tools, right click in the page and click Inspect or you can just press the shortcut keys “Ctrl+Shift+I” or “F12”. A section will appear containing various developer tools.



Step 2: Now press the shortcut key “Ctrl+Shift+P” to access the Run Command menu. Type “coverage” and from the options that appear click Show Coverage. Alternatively you also open Coverage tool by just clicking three dots in the top right corner and navigating to More tools > Coverage from the menu that appears.

Opening Coverage Tool Using Run Command menu

Understanding various option in the Coverage Tool

Let’s go from left to right and understand each option in Coverage Tool.

Various Buttons in Coverage Tool

Article Tags :