In themes functions file add
// Remove unwanted HTML comments
function remove_html_comments($content = '') {
return preg_replace('/<!--(.|\s)*?-->/', '', $content);
}
Hi,
thanks for the help i used your code but still shows!
I don’t use this solution myself, I have google pagespeed on my server with a filter that removes html comments. But unless you have root access to your server this isn’t possible.
All you need is a plugin or some functions code that will remove html comments.
Hmm talking about Pagespeed is it really speeding your website ?
I found solution
Great
Hmm talking about Pagespeed is it really speeding your website?
It does although the main boost comes from deferring javascript and converting images from jpg to webp on the fly. Both of which can be achieved by simpler means.
Most of the other filters have a minimal effect to be honest. Deferring javascript can also mess up your site in some browsers so needs thorough testing.
Goto Debug tab on http://yourwebsite.com/wp-admin/options-general.php?page=wpsupercache&tab=debug and uncheck below option:
[x] enabled
Display comments at the end of every page like this:
<!-- Dynamic page generated in 0.450 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2015-12-02 16:28:48 -->
<!-- super cache -->
(@dolomats0)
11 years, 4 months ago
Hello
Good plugin, really speed up my website but i have a question.
How can i remove the wp super cache comment that apear at buttom.
Because i worked long time to hide the fact that i m using wordpress
for security reasons and until now i was able to do so.
Only one thing remaining it’s wp super cache comment :
<!– Dynamic page generated in 1.453 seconds. –>
<!– Cached page generated by WP-Super-Cache on 2015-01-24 20:31:10 –>
<!– Compression = gzip –>
<!– super cache –>
Is it possible to remove it ?
Thank you
https://ww.wp.xz.cn/plugins/wp-super-cache/