W3 Total Cache
FEATURE: move external scripts to before minified scripts (1 post)

  1. helgatheviking
    Posted 2 years ago #

    I find that scripts that depend on external scripts (usually 3rd party APIs and the such) fail when minified because the minified script is loaded first thing, while the external script is skipped and comes later. So the local scripts don't have the objects/functions that they require and produce errors.

    Yes manual minify mode exists, but I'm thinking that if you could move the external scripts to load prior to the combined, minified script you could still do it all automatically.

    What if any external scripts were moved to a low priorty of wp_enqueue_scripts and the minified script came at a high priority on the same hook? Or what if there was an option to move the minified script to the footer? I don't know how hard this would be, but if it weren't to difficult it would be a big step in making the awesome auto-minify setting work for more people.

    This user suggests a way to move the minifed script to the footer:
    http://www.securefreak.com/moving-w3-total-cache-minify-auto-javascript-to-footer/ via the thread:


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by helgatheviking
  • This topic is not resolved
  • WordPress version: 3.4.1