I am doing some JavaScript cleanup work on a legacy project, and trying to get rid of redundant JS libraries. I have done all the obvious ones (those that are not references from anywhere at all). But there are a number of JS files that are included in all pages (via tiles).
How can I find out whether they are actually used, short of going through content of each and search for each function in them? Is there a smarter/easier way to do this? It's a java based / Spring project if that helps by the way.
console.log("I'm in xxx file");there is no certainty that JS code won't execute on some user interaction, after some time or even based on some cookie/request parameter that is set when user go through some pages.