Title: One CSS &amp; One JS
Last modified: January 5, 2018

---

# One CSS & One JS

 *  Resolved [doctordogg](https://wordpress.org/support/users/doctordogg/)
 * (@doctordogg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/)
 * Hello guys,
 * Can you help me with such type of issue?
 * I use your plugin and I want only one css and one js as a result.
 * But when I use you plugin I have three JS files: [http://dl4.joxi.net/drive/2018/01/05/0024/2304/1575168/68/0070dd08e7.jpg](http://dl4.joxi.net/drive/2018/01/05/0024/2304/1575168/68/0070dd08e7.jpg)
 * And six CSS files: [http://dl3.joxi.net/drive/2018/01/05/0024/2304/1575168/68/516475b517.jpg](http://dl3.joxi.net/drive/2018/01/05/0024/2304/1575168/68/516475b517.jpg)
 * Can you give me advice, do I have opportunity to have only one css and one js
   file on my site?
 * Thank you for your plugin and your answer in advance.
 * Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9840580)
 * Hi,
 * You have to look at the status page for the logs.
 * For the JS files, plugins can enqueue files either in the header or footer.
    
   Those in the header, are merged into one request it seems. In the footer you 
   have 2… which usually means you have a set of JS files, then some external js
   script (some cdn, or whatever) OR some file in the ignore list, and finally another
   set of JS files.
 * A developer would find out which file in the middle is causing the merging, dequeue
   it, and then enqueue it again after all other JS files.
    Doing this would prevent
   the splitting and all JS files in the footer should be merged.
 * The other possible way, are JS files separate for mobile and desktop.
    If you
   have files that load only on mobile and others that load only on desktop, or 
   files that load conditionally based on the browser, etc… that’s also going to
   generate multiple JS files.
 * With the CSS is exactly the same.
    You most probably have a mobile only CSS file
   somewhere, so at least 2 CSS files are expected. As for 6 files, it’s again dequeuing
   those in the middle and send them to the end. It could be fonts, or some cdn 
   or something else.
 * —
 * If you want to try a few things you can:
 * a) For the CSS, you could choose to inline it (I usually do this).
 * b) For the CSS where your files use a CDN or some external domain, try to add
   that domain to the Pro tab. There’s a section there to fetch and merge those 
   files if they are simply external urls (add one domain per line).
 * c) The same can be done in the Pro Tab for the JS external files.
 * Note: Do not remove files from the blacklist or default ignore list. Those are
   there because they are known to break things, 99% of times.
 * Also read the faqs:
    [https://wordpress.org/plugins/fast-velocity-minify/faq/](https://wordpress.org/plugins/fast-velocity-minify/faq/)
 * And if nothing else, you need a developer to do advanced optimization and properly
   figure out how to enqueue and dequeue the css and js files.
 * If you have hardcoded css files on the header.php… that’s wrong and won’t be 
   detected by the plugin. They need to be enqueued (use dependencies if you need
   them to be at a specific position).
 *  Thread Starter [doctordogg](https://wordpress.org/support/users/doctordogg/)
 * (@doctordogg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9843360)
 * Hello Raul,
 * I have found that the second footer’s JS file is entirely resmap.min.js from `
   Responsive Maps` plugin.
    It has been added using function wp_enqueue_script()
   with parameter $in_footer = true : [http://dl4.joxi.net/drive/2018/01/08/0024/2304/1575168/68/c614b97e1a.jpg](http://dl4.joxi.net/drive/2018/01/08/0024/2304/1575168/68/c614b97e1a.jpg)
 * [http://dl4.joxi.net/drive/2018/01/08/0024/2304/1575168/68/04dacf6056.jpg](http://dl4.joxi.net/drive/2018/01/08/0024/2304/1575168/68/04dacf6056.jpg)
 * [http://dl4.joxi.net/drive/2018/01/08/0024/2304/1575168/68/8ac8db506b.jpg](http://dl4.joxi.net/drive/2018/01/08/0024/2304/1575168/68/8ac8db506b.jpg)
 * But all others js files are also added by the function wp_enqueue_script() with
   $in_footer = true
 * I can’t understand why there are TWO footer’s JS files?
 * This js file does not appear in `Default Ignore List` or in `Default Blacklist`
 * Any advice?
 * Thanks.
    -  This reply was modified 8 years, 5 months ago by [doctordogg](https://wordpress.org/support/users/doctordogg/).
    -  This reply was modified 8 years, 5 months ago by [doctordogg](https://wordpress.org/support/users/doctordogg/).
    -  This reply was modified 8 years, 5 months ago by [doctordogg](https://wordpress.org/support/users/doctordogg/).
 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9843379)
 * The reply is actually on that same image.
    There’s an external, google map api
   file being enqueued there. That will break the series of JS files. Try to remove
   that google maps api for testing and see if it works. If it does, move it down.
 *  Thread Starter [doctordogg](https://wordpress.org/support/users/doctordogg/)
 * (@doctordogg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9844223)
 * Thank you Raul,
 * I have found that the reason of the ‘3 JS files’ problem is `Responsive Styled
   Google Maps` plugin.
    But I think that customizing of it is the bad idea.
 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9844553)
 * You don’t need to customize it.
 * You can simply dequeue that script by using the same handle and location, and
   requeue it again with an higher priority, on your theme functions.php or some
   custom made plugin.
 * [https://codex.wordpress.org/Function_Reference/wp_dequeue_script](https://codex.wordpress.org/Function_Reference/wp_dequeue_script)
   
   [https://developer.wordpress.org/reference/functions/wp_enqueue_script/](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
 * A developer can help you solve that, or you can try to learn and play around 
   with the codex information.
 *  Thread Starter [doctordogg](https://wordpress.org/support/users/doctordogg/)
 * (@doctordogg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9847484)
 * Hello Raul,
 * It is great idea! Thank you very much,
    But `Responsive Styled Google Maps` plugin
   makes me confused.
 * When I remove all calling of wp_enqueue_script() function,
    for unknown reason
   it’s js files still remain inside the page.
 * It is not problem of your plugin.
 * Thank you for your help.
 * 😉

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘One CSS & One JS’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [doctordogg](https://wordpress.org/support/users/doctordogg/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/one-css-one-js/#post-9847484)
 * Status: resolved