The problem is that there is no way to be really sure. Assume the following:
- The original HTML site is almost empty. However, there is a lot of JS code that doesn't seem to be used.
- OnLoad, a function is called that launches an AJAX request to the server. The server returns a lot of HTML code, which is the body of the site. This body contains many JavaScript features.
- The original body is replaced by the body received through AJAX. Suddenly all code is used.
Static analysis utilities are therefore useless. I don't know if there is a browser extension that marks all JS usage from a working browser.
parasietje
source share