0

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?

3
  • The question is voted for closure. I think the question is clear and it is not primarily opinion based. I think there are objective pointers about the use of JS and CSS merging. – 7ochem May 15 '18 at 9:53
  • I've re-worded the question so it's less opinion based. My 2 cents is CSS/JS merging can cause a lot of issues, and these issue can take a long time to fix which may be what they quoted for. Why not ask them why they quoted so high? If they're honest they will be able to give an answer. – Ben Crook May 16 '18 at 15:22
  • On the flip side, if you enable merging and it works for you then go with it. If you get any errors see if disabling merging helps. – Ben Crook May 16 '18 at 15:22
2

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.