• Resolved coleatkinson1

    (@coleatkinson1)


    How do I use externally linked scripts with this feature? Scripts in my theme/plugins that are linked from external sources break if I add for example jquery, and they depend on jquery.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Just to make sure I understand. You want those external JS (and maybe CSS) to combine into one?

    Thread Starter coleatkinson1

    (@coleatkinson1)

    Sorry, I should be more clear:

    On the page “Performance -> Minify” under JS / JS File management, you can add scripts. I use this feature to improve page load time, as per my results on Pagespeed Insights.

    The problem is when a plugin or theme includes an external javascript, e.g.
    <script src=”https://www.someexternalsite.com/myscripts.js”></script&gt;
    If this script depends on a script that I have loaded in the W3TC JS File management section, then I will get a dependency error.

    How to get around this problem?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    Manual minify can be a very tricky process. Maybe you should consider combining those JS using async. When you enable manual minify, Go to Performance>minify and under
    JS minify settings: choose to combine only Embed type: Non-blocking using async.
    When you save the settings go to the help wizard button on the same page just above the General box. Add JS and CSS files with care. If you experience any code breaking remove the file from the list.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JS File management for external scripts’ is closed to new replies.