• Resolved steemansnick

    (@steemansnick)


    Hello, I really like this plugin and recommend it to everybody.

    There is one question. It combines js files very nice, but why are there still a few?
    I’ll give an example: my sites has now 5 js files. Is it possible to purge it into 1?

    Example here: https://i67.tinypic.com/210j2xi.jpg

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Raul P.

    (@alignak)

    That can happen for a number of reasons and some sites have only one while others have more.

    If you have scripts in the header and in the footer, that’s already at least 2 files.

    If you add some file to the ignore list, it creates a group of files before that file, then ignores that file, and then it creates yet another group of files for the next group of files. This is needed because the order of scripts need to be kept.

    If you load one script from a cdn in between other scripts, it will act as the ignore option, so a group of js files before that cdn file + the cdn file itself + another group of js files.

    If you’re logged in, you may see more files also because some of them are for wp-admin only.

    The plugin will create the least amount of files possible for the header and do the same for the footer.

    If the order of scripts do not matter, then you can code on your functions.php file a way to dequeue the external cdn files and requeue them again. That would move them together to the end and there would be no interruptions when the plugin starts merging the js files together.

    Also be advised that not all scripts can be merged together. Some scripts can conflict with each other so having lots of them bundled into one not always work.

    Thread Starter steemansnick

    (@steemansnick)

    Aha, that’s how it works.

    Thank you very much for your fast reply and your crystal clear explenation.

    Keep it up!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Combine even more’ is closed to new replies.