Excluding External JS from Concatenation
For example, if you would notice an issue with a file like this:
…the part of the URL that you would need to exclude from WP Rocket’s file optimization would look like this:
Similarly you would trim any other external file URL to its (sub-)domain part only.
📥 Download (.zip): WP Rocket | External Script Handler
Developers: You can find the code for this plugin on GitHub.
Remember: Manual code edits are required before use!
In order to add a custom script entry to the plugin, you would insert a line similar to the following one just before the
return $external_js_hosts; statement:
$external_js_hosts = 'example.com';
Also, take note of the hosts that are already included in the plugin. Maybe you don’t even have to add yours again, because it is already there?