how To Reduce Js files size
In one of my clients website
SEMrush report says MY pages have more than 2 mb js and css files
but i dont know what and how to reduce
page link :- https://www.transfi.com/pt/products/ramp
1 Reply
in console go to network tab and refresh page. sort by size and look at scripts and css files that are coming in.
looks like they are loading a nextjs app that is pretty big - probably the one in the hero which is a bit large but might be required for functionality. Also saw hotjar in there which is not a huge file but marketing scripts that do things like heat maps are notorious for causing slow experience.
There are a lot of inline scripts that could be minified.
It's not a button-click fix. Lots of involved work refactoring code, moving thigns around / removing. Seeing if you can use vanilla JS instead of external dependencies, etc.