• Resolved mikkelhusum

    (@mikkelhusum)


    I’ve been using the plugin for a while and I definitely think it’s a great plugin with a bunch of options. But I am having trouble with the newest update from the Avada theme, because the Fusion Script are generating a new JavaScript file everytime it loads and it changes name. So I would like to know if it’s possible to exclude a folder on a server instead of just an specific file. The folder I want to exclude has this path “wp-content/uploads/fusion-scripts”.

    Hopefully someone could help me – thanks.

    • This topic was modified 7 years, 4 months ago by mikkelhusum.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Ben

    (@benbornschein)

    Hi,

    I have checked what Avada does and this is ok. It looks like they only generate a new JavaScript file when the page need a specific JavaScript component.

    For example: if your page does not display a slider they do not add the JavaScript which handles the slider. Visual Composer does something similar.

    Do you have experienced any bad side effects? As far as I know it is not possible to exclude a folder from being merged.

    Thread Starter mikkelhusum

    (@mikkelhusum)

    Hi Ben.

    Yes the thing Avada does is fine. But the JavaScript file changes name for every new visit for example from “4dce9b9e46d71fc804dafa693af7050d.js” to “e670fa0e2cde8bc67fe51fb29a7436ce.js” which makes it impossible for Total Cache to exclude. The problem I was having, was if I enable JS minify settings and selecting “Non-blocking using async” for both “before header” and “after body”, I was getting an jQuery error in the console log.

    But the problem seems to be fixed with just changing the “After body” selection to “Non-blocking using defer”. But it would still be a great feature for the Total Cache plugin if you could have the option to exclude a folder of files.

    Ben

    (@benbornschein)

    Yes they change the name of the file because the JavaScript in 4dce9b9e46d71fc804dafa693af7050d.js differs from e670fa0e2cde8bc67fe51fb29a7436ce.js.

    It is not easy and recommended to exclude JavaScript because many JavaScripts depend on other JavaScripts and excluding them can cause that your JavaScript breaks.

    But I’m glad that you found a solution ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to exclude JS folder in minify?’ is closed to new replies.