问题
I'm working on a website which is quite a mess. In the <head>
of the website about a zillion javascript libraries are loaded and I think many of them are not used anymore. The problem is that I'm not sure.
In Python (my language of choice) there are always clear namespaces and using a capable Python editor (such as Pycharm) clearly highlights unused imports. I'm looking for something similar in html/javascript.
I can of course start writing a comprehensive set of UI-tests (which I should do anyway), but that is something for a later stage. I first want to clean up the code a bit and speed up loading time.
Does anybody know (a preferably simple way) how I can find out if a library loaded in <head>
is still used anywhere on the website?
来源:https://stackoverflow.com/questions/33145094/how-to-know-if-javascript-lib-is-still-used-in-a-website