Question

I activated JS/CSS merging, which resulted in 75 less requests and 3-5 seconds faster page load. But the agency which works with my company claims that merging is a big error source and we should not activate it, because they have had bad experience with it.

However, the same company claimed that activating merging is a lot of work and they wanted a lot of money for doing it, even though it is two checkboxes, so I'm not sure if I can trust them.

What are the pros and cons of activating JS/CSS merging?

Was it helpful?

Solution

There are two points of attention when considering merging CSS and JS.

The first point is if it would actually speed up your website loading. If your hosting provider can offer you HTTP2, then merging JS and CSS would not be necessary (at least not for the amount of files and thus requests).

In your case merging JS and CSS does give you considerable load time advantage.

Second point is: Is your JS and CSS written in a "merge safe" way? And this is probably the issue why that agency states that "merging is a big error source".

If the JS merging is indeed only combining the files and not doing any minification, then you should expect this would not give any problems. If you also apply some form of minification, then if the Javascripts are written poorly, this can give issues.

If that same agency has written these Javascripts (poorly), then in my opinion they would also be responsible to solve issues arising from merging and minifying them.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top