Title: Missing after enable &#8220;Optimize JavaScript Code&#8221; + &#8220;Aggregate JS-files&#8221;
Last modified: October 5, 2018

---

# Missing after enable “Optimize JavaScript Code” + “Aggregate JS-files”

 *  Resolved [sammyhk](https://wordpress.org/support/users/sammyhk/)
 * (@sammyhk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/)
 * Thank you for your great work.
 * After upgraded to Autoptimize 2.4, we found enabling “Optimize JavaScript Code”
   + “Aggregate JS-files” will cause the generated HTML missing </html> end tag.
   This cause “WP Super Cache” plugin not working. Actually we suspected after Autoptimize
   2.4 upgraded, “WP Super Cache” keeping not caching any page. After enabled the“
   WP Super Cache” debug log, it show “<!– Page not cached by WP Super Cache. No
   closing HTML tag. Check your theme. –>” in the generated HTML. When we disabled“
   Aggregate JS-files” in Autoptimize, the HTML return normal and “WP Super Cache”
   works again.
 * Please help to fix this issue when you have time.

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10753501)
 * this should be fixed in the upcoming 2.4.1 release, would be great if you could
   [download the beta](https://github.com/futtta/autoptimize/archive/beta.zip) and
   test to confirm? 🙂
 * happy friday!
    frank
 *  Thread Starter [sammyhk](https://wordpress.org/support/users/sammyhk/)
 * (@sammyhk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10753742)
 * Checked the beta version attached, result:
    1) Enabling “Aggregate JS-files” 
   still got missing </html> end tag (so not fixed) 2) Enabling “Aggregate CSS-files”
   still got blank page due to incomplete/ incorrect HTML generated as mentioned
   in other threads.
 * Conclusion: the beta version do not fix this issue currently.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10753818)
 * weird …
 * * re (2) can you point me to the “other threads”?
    * can you share your site’s
   URL?
 * frank
 *  Thread Starter [sammyhk](https://wordpress.org/support/users/sammyhk/)
 * (@sammyhk)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10754764)
 * This is our internal developing site ([http://59.148.109.46:8080/](http://59.148.109.46:8080/)),
   I set up a clear installation with only autoptimize and faith theme ([https://www.ilovewp.com/documentation/faith/](https://www.ilovewp.com/documentation/faith/)).
 * After installation, when enable “Aggregate JS-files”, just got missing </html
   > end tag.
    Similarly, when enable “Aggregate CSS-files”, just got blank page
   due to incorrect HTML generated:
 *     ```
       	<!DOCTYPE html>
       <html lang="zh-HK">
       <head>
       <meta charset="UTF-8">
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <link rel="profile" href="http://gmpg.org/xfn/11">
   
       <link type="text/css" media="all" href="http://59.148.109.46:8080/wp-content/cache/autoptimize/css/autoptimize_c6695eac6a129494418e73fdef797d5c.css" rel="stylesheet" /><style type="text/css" media="print">#wpadminbar{display:none}</style><style type="text/css" media="screen">html{margin-top:32px !important}* html body{margin-top:32px !important}@media screen and (max-width:782px){html{margin-top:46px !important}* html body{margin-top:46px !important}}</style><title
       ```
   
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10755095)
 * hey [@sammyhk](https://wordpress.org/support/users/sammyhk/); I install Faith
   on my local machine (which is running 2.4.1-beta, you’re using that as well, 
   right?) and I can’t reproduce either problem, so something else must be going
   on. can you contact me via futtta-at-gmail-dot-com to exchange some info on server
   setup & configuration?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10756858)
 * [fixed](https://github.com/futtta/autoptimize/commit/a86618b4a1e79c0b99a58830db0d57d0042920dc)
   thanks to Sammy’s help, thanks Sammy!

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

The topic ‘Missing after enable “Optimize JavaScript Code” + “Aggregate JS-files”’
is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [Upgrade issue](https://wordpress.org/support/topic-tag/upgrade-issue/)

 * 6 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/missing-after-enable-optimize-javascript-code-aggregate-js-files/#post-10756858)
 * Status: resolved