Forum Discussion

Hoekstra_VFZ's avatar
2 months ago

Remove unused data from lia-scripts-body-min.js?

Hi all,

Long time no see.

We are optimizing the loading times of our Community pages and looking at it from different angles. We allready removed some monitoring-scripts that our Corporation injects on all domains. We have optimized some components.

One of the tools is doing a performance test in Edge/Chrome via Lighthouse. This points out a lot of things, there are a few issues with image sizes being full res when it is not needed.

Lighthouse also says the main Khoros Javascript file is very large (Javascript file of 4,3MB) of wich 75% ar unused bytes. It concerns script: /t5/scripts/D35BF2B1BD3AD224F7D497E86C86DB4F/lia-scripts-body-min.js

We are not sure if this has a big impact in the real world. It seems worth it to cut out the 3MB of data transfer.

We asked support, support says it is an OOTB thing. This implies the thing is not broken and they cannot put resources into it. They refer to this discusion board.

So, do you guys know if unused bytes in a Javascript file (specifically lia-scripts-body-min.js) is an issue? And if this is something our vendor could fix or should fix?

  • Well, of course it's an issue in terms of load times, but there's also nothing you can really do about it because that file simply contains all out of the box javascript Khoros could ever use on all of it's pages, it's an "oldschool" bundle that combines all various javascript libraries, plugins etc. into one file and over the years it grew to it's monstrous size... and "unused" bytes is also a bit tricky, they might be unused on the particular page you analyzed, but on otherpages other parts might be used...