3
3
31Russ2018-03-27 19:00:28
css
31Russ, 2018-03-27 19:00:28

?Way to get rid of unnecessary code?

Hello. I bought an admin panel on the forest and based on it I made a template for a new project. A lot of ready-made elements, pages, scripts and other things, which made it possible to make the theme in a short time.
Now I understand my mistake. There are a lot of scripts/libraries and css files connected in the template, something has already been removed, of course, but there is still a lot of superfluous left. Even the main css file could be lightened from unnecessary code.
Actually the question: - Is there a way to get rid of unnecessary libraries and remove extra code (not used). It's not about sitting and rubbing it all with your hands. Perhaps there are solutions to this problem.
Another option is to simply take and rewrite the whole topic again ..... This thought comes up more and more often.
Google speed test shows 79 percent right now (all files are compressed)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-03-27
@azerphoenix

Hello!
There was a similar case...
I downloaded a template for bootstrap 4. What I did....
You must have created a theme based on a specific html file. For example index.html I removed other html, left CSS & JS. Then I opened the CSS file and started commenting out a large number of lines and checking if it was reflected on the page. If not, then we move on and so on until the very end. Same thing with js. For js, you can still use Visual Events and see where which script is used.
Maybe some automated systems ... but this method was not difficult. Although I also had a admin template... with a bunch of scripts for charts and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question