Combine and minify all local .js and .css files

Stuart Wright

Well-known member
So are Mike and Kier clever enough to figure out which locally (or CDN) hosted .js and .css files are loaded into the page (including those from addons), pre-load all the .js files into a single .js file or maybe load them into the actual page, do the same with .css files and defer the .js ?
Speed up the page in a clever way?
Is it possible?

Jeremy P

Well-known member
+1 for concatenation and minification of all CSS and JS.

I never really understood what the design decision was behind having 2 CSS requests. I originally thought it was for flexibility but the CSS is served dynamically anyways.. why not expand the way the CSS part of the template system works to accommodate for any limitations or problems in serving a single file.

The way javascript is handled in XF would have to change to be served more like CSS, but it doesn't seem too hard to make those changes. And XenForo already uses a minifier library that works with javascript.