Title: W3 Total Cache not removing comments from JavaScript &amp; CSS
Last modified: August 20, 2016

---

# W3 Total Cache not removing comments from JavaScript & CSS

 *  [kylecfox](https://wordpress.org/support/users/kylecfox/)
 * (@kylecfox)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/w3-total-cache-not-removing-comments-from-javascript-css/)
 * When I enable minification of JS and CSS, W3 Total Cache inserts line-number 
   comments!
 * I’ve tried JSMin, YUI Compressor, and Closure Compiler — they all yield the same
   result. Here’s an example from the combined CSS file (/wp-content/w3tc/min/48c331e6.83ab9a.
   css)
 *     ```
       /* 14   */ html, body, div, span, applet, object, iframe,
       /* 15   */ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
       /* 16   */ a, abbr, acronym, address, big, cite, code,
       /* 17   */ del, dfn, em, img, ins, kbd, q, s, samp,
       /* 18   */ small, strike, strong, sub, sup, tt, var,
       /* 19   */ b, u, i, center,
       /* 20   */ dl, dt, dd, ol, ul, li,
       /* 21   */ fieldset, form, label, legend,
       /* 22   */ table, caption, tbody, tfoot, thead, tr, th, td,
       /* 23   */ article, aside, canvas, details, embed,
       /* 24   */ figure, figcaption, footer, header, hgroup,
       /* 25   */ menu, nav, output, ruby, section, summary,
       /* 26   */ time, mark, audio, video {
       /* 27   */   margin: 0;
       /* 28   */   padding: 0;
       /* 29   */   border: 0;
       /* 30   */   font: inherit;
       /* 31   */   font-size: 100%;
       /* 32   */   vertical-align: baseline;
       /* 33   */ }
       ```
   
 * The combined JavaScript file looks similar:
 *     ```
       /* jquery.cycle.js */
   
       /* 101  */
       /* 102  */ function triggerPause(cont, byHover, onPager) {
       /* 103  */     var opts = $(cont).data('cycle.opts');
       /* 104  */     var paused = !!cont.cyclePause;
       /* 105  */     if (paused && opts.paused)
       /* 106  */         opts.paused(cont, opts, byHover, onPager);
       /* 107  */     else if (!paused && opts.resumed)
       /* 108  */         opts.resumed(cont, opts, byHover, onPager);
       /* 109  */ }
       ```
   
 * What’s going on?
 * [http://wordpress.org/extend/plugins/w3-total-cache/](http://wordpress.org/extend/plugins/w3-total-cache/)

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

 *  [Chris Olbekson](https://wordpress.org/support/users/c3mdigital/)
 * (@c3mdigital)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/w3-total-cache-not-removing-comments-from-javascript-css/#post-3029089)
 * You have error reporting turned on. Go to performance -> general and uncheck 
   minify error reporting.
 *  Thread Starter [kylecfox](https://wordpress.org/support/users/kylecfox/)
 * (@kylecfox)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/w3-total-cache-not-removing-comments-from-javascript-css/#post-3029090)
 * Thanks for the reply. I forgot to update this post with that info — the W3TC 
   author contacted me with the same response you gave.
 * However, when I turn off error reporting the files don’t combine at all. All 
   I see is an message saying the files couldn’t be minified, and that I should 
   turn on error reporting 😛
 *  [Chris Olbekson](https://wordpress.org/support/users/c3mdigital/)
 * (@c3mdigital)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/w3-total-cache-not-removing-comments-from-javascript-css/#post-3029091)
 * Whenever you get that minified error it is because one of the files can not be
   found. Go to your minify settings page and click verify on each file to make 
   sure it is not returning a 404.
 * Also if you have the version query strings set in your minify settings make sure
   you update them to 3.4.2 if you recently updated to latest WordPress version.
 *  Thread Starter [kylecfox](https://wordpress.org/support/users/kylecfox/)
 * (@kylecfox)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/w3-total-cache-not-removing-comments-from-javascript-css/#post-3029092)
 * Weird – I don’t see “verify” or any files listed on either the Minify or General
   settings page.

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

The topic ‘W3 Total Cache not removing comments from JavaScript & CSS’ is closed
to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [minification](https://wordpress.org/support/topic-tag/minification/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)

 * 4 replies
 * 2 participants
 * Last reply from: [kylecfox](https://wordpress.org/support/users/kylecfox/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/w3-total-cache-not-removing-comments-from-javascript-css/#post-3029092)
 * Status: not resolved