Which method is best to enqueue scripts

Always use the built-in versions. Don’t waste time with old WordPress installations – other plugins will break there too.

See wp-includes/script-loader.php for the list of available files. Quite a lot. 🙂

And avoid remote resources. Some (Google) fail to send the scripts gzip compressed to all supporting browsers, others may not be reliable enough. There is also a privacy issue. Not everyone is happy with a log entry on other sites servers each time a user visits wp-admin

And if another plugin does the right thing and loads the WordPress script parallel to your remote resource you end up with a useless request and possible script conflicts.

Leave a Comment