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
- Chrome Developers Tools
Command
+Shift
+p
- Search
Coverage
- Click
Show Coverage
- 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%????? |
HAHWULSecurity engineer, Gopher and H4cker! |
Really Great
ReplyDeleteThank you :)
ReplyDeleteThanks for given info..
ReplyDeleteYou're welcome :D
DeleteNice article Mera Up Bihar
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteFor Author of Article - Great Content, But I not able to find where is command key on computer (please help!)
ReplyDeleteFor Visitor of Website - Check Latest Job List - www.listofjob.in
Command keys are only used in the Mac. You can use Ctrl + Shift + p in other OS such as Windows or Linux :D
DeleteYes, Sir!
DeleteI find that and complete all your process which given above in article, but please tell me then what?
How can I remove those red colour (unused java scripts). I want to remove those unused java scripts but I not able to make any changes in Google Developer Tool.
I also copy those codes and try to find those codes on my website's templete but templete not show any of those codes. {My website is in blogger. So, give me solution which I can implement}
hello, how do i then remove the unused javascript? I have a shopify website and need assistance for the next step.
ReplyDeleteremove kesy krna ye b bta dety
ReplyDelete