1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Combine and minify all local .js and .css files

Discussion in 'XenForo Suggestions' started by Stuart Wright, Apr 2, 2014.

  1. Stuart Wright

    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?
     
    eberkund, briansol, md_5 and 2 others like this.
  2. Jeremy P

    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.
     

Share This Page