Hi.
Today, I will briefly talk about how to identify unused JS and CSS on the web page.
If you take advantage of this, you can reduce unnecessary code, so you can create faster web services.

TL;DR

  1. Chrome Developers Tools
  2. Command + Shift + p
  3. Search Coverage
  4. Click Show Coverage
  5. if you Click Items, show use/unused code(js,css)

Step by Step


1. Chrome Developers Tools

Chrome engines are all the same. (Opera, Brave, etc..)

2. Command + Shift + p
// It is powerfull command! find any browser tools

3. Search Coverage and click Show Coverage

4. Click start capturing coverage

5. if you Click Items, show use/unused code(js,css)
what? 98.8%?????

댓글 2개: