XF 1.5 Can I aggregate JS files?


Active member

I'm just working on my site to improve SEO and get a better Google ranking with pagespeed insight.

One of the common ways to improve page loading is to reduce the number of http requests for a single page. Is there any possibility to aggregate js files within XF?
Regards, rhodes


XenForo developer
Staff member
There's nothing built in to do that.

You may reduce the number of requests, but you do risk reduced cacheability if you go down this route. Assuming you aggregate all requested JS dynamically, any differences in what's requested between pages will mean a cache miss for all of the JS. Separate files maintain that granularity though at the expense of request overhead.