Title: Merging external javascript/css files
Last modified: June 21, 2018

---

# Merging external javascript/css files

 *  Resolved [darknezx](https://wordpress.org/support/users/darknezx/)
 * (@darknezx)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/merging-external-javascript-css-files/)
 * Thanks so much for the plugin, I’m really amazed by the speed of this vis-a-vis
   the other minify plugins.
 * 1) However, I have been getting YSlow issues that say my site has 20 external
   javascript/css files, and I should consolidate them. I was wondering if FVM is
   able to do that?
 * Also, I just saw a YSlow recommendation that highlighted some JS that weren’t
   assigned to my CDN subdomain.
 * 2) There seem to be 5 static components that are not on CDN for my blog. I’m 
   using this concurrently with W3 Total Cache and BunnyCDN.
 * [https://pewpewpew.cc/wp-content/uploads/fvm/out/header-cb050ccd-1529555165.min.js](https://pewpewpew.cc/wp-content/uploads/fvm/out/header-cb050ccd-1529555165.min.js)
   
   [https://pewpewpew.cc/wp-content/uploads/fvm/out/header-088e0262-1529555165.min.js](https://pewpewpew.cc/wp-content/uploads/fvm/out/header-088e0262-1529555165.min.js)
   [https://pewpewpew.cc/wp-content/uploads/fvm/out/footer-2534051f-1529555165.min.js](https://pewpewpew.cc/wp-content/uploads/fvm/out/footer-2534051f-1529555165.min.js)
   [https://pewpewpew.cc/wp-content/uploads/fvm/out/footer-935c523b-1529555165.min.js](https://pewpewpew.cc/wp-content/uploads/fvm/out/footer-935c523b-1529555165.min.js)
   [https://pewpewpew.cc/wp-content/uploads/fvm/out/footer-0ddf0312-1529555165.min.js](https://pewpewpew.cc/wp-content/uploads/fvm/out/footer-0ddf0312-1529555165.min.js)
 * Is there somewhere where I need to specify my cdn subdomain to FVM?
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/merging-external-javascript-css-files/#post-10444805)
 * There is an option to specify your cdn domain on FVM, however it doesn’t work
   when you select the defer for pagespeed insights option. The reason is here: 
   [https://developers.google.com/web/updates/2016/08/removing-document-write](https://developers.google.com/web/updates/2016/08/removing-document-write)
 * Putting them on the cdn may cause them to not load on slow connections, but it’s
   fine to use the defer for insights method, if their are on the same domain.
 * But more importantly, you seem to have a lot of js files, which is definitely
   not normal.
    The only time this happens, is when you have a lot of js files that
   are loaded from external cdn providers.
 * ex: if you load 5 js files from your domain, then one from google, then another
   from your domain, then another from cloudflare, then another 3 from your domain…
 * the first 5 would be merged into one,
    the google one would break the series (
   because order matters), the other file on your domain would be minified, the 
   cloudflare one would break the series again, then the last 3 would be merged 
   again into another file.
 * —
 * You can probably use the option on FVM to add some of those external domain, 
   so FVM can fetch them and merge them together without breaking the series (thus
   less files).
 * In your case, adding these to the list of allowed merging domains, would probably
   work.
    cdn.pewpewpew.cc s0.wp.com ajax.googleapis.com/ajax/libs/webfont/
 * Alternatively, you could edit your theme to dequeue those external files and 
   load them locally, instead of from the cdn. The issue here is that FVM tries 
   to keep the order of scripts, and it will split them whenever it finds an external
   file (doesn’t match your site domain).
 * Finally, you could also try the autoptimize plugin, as it’s generally easier 
   to setup if you’re not a designer or have no development skills.

Viewing 1 replies (of 1 total)

The topic ‘Merging external javascript/css files’ is closed to new replies.

 * ![](https://ps.w.org/fast-velocity-minify/assets/icon-128x128.jpg?rev=1440946)
 * [Fast Velocity Minify](https://wordpress.org/plugins/fast-velocity-minify/)
 * [Support Threads](https://wordpress.org/support/plugin/fast-velocity-minify/)
 * [Active Topics](https://wordpress.org/support/plugin/fast-velocity-minify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fast-velocity-minify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fast-velocity-minify/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Raul P.](https://wordpress.org/support/users/alignak/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/merging-external-javascript-css-files/#post-10444805)
 * Status: resolved