The site was made a long time ago, then it was reworked, at first everything worked on prototype, then a part was rewritten to jQuery, but the prototype still remained, because some services were rewritten into scrap because of their volume. Now 2 frameworks work together.
Also on the site a lot of different lotions, well, there for scrolling sliders, etc.
The code is so messed up that it’s already terribly awkward to enter the main file, naturally no one remembers what the script is for, initially everything fell onto the main page and almost all js is loaded onto the main page and all the others.
How now to understand which js files are no longer needed, which are not used, so that without harm to the site, because it is possible that the file is used on any one page, but it is loaded into each page. This is terrible, and I would like to restore order + improve the quality of the html template + speed up the page.