Unexpected behavior with ‘Exclude Scripts’ in Optimize JS
-
The setting found in “Optimize JS” -> “Optimize JS” -> “Exclude Scripts” – I’m not sure if this is doing what it’s supposed to do. The text under the box says “Enter one per line to exclude certain JS files from being deferred.”
So does this mean that any script listed here should remain in it’s original location in the raw HTML, rather than be moved to the footer?
When I enter the path of one of my custom .js files in this box, it’s totally removed from the entire site. My custom script itself is inserted in functions.php with:
wp_enqueue_script('ajax-js', get_stylesheet_directory_uri() . '/js/ajax-location-2.js', array('jquery'), null, true);I don’t think other scripts are being removed, so what is going on?
The topic ‘Unexpected behavior with ‘Exclude Scripts’ in Optimize JS’ is closed to new replies.