Support » Plugin: W3 Total Cache » A tenative solution for the "How can I remove the footer comments" question

  • Let me preface this by saying that in the wrong hands this solution may have all kinds of unexpected results. That said, it solves my problem and could be useful to others.

    In my situation, I am generating a custom mRSS playlist file for use with the JWPlayer video player. Technically the comment shouldn’t break the RSS feed, but I also have some custom front-end AJAX output that this will help with.

    The solution: ob_end_clean();

    Why it works:
    The footer is appended by a series of output buffers that the plugin uses to process the page output. Among these tasks is the addition of this comment footer.

    What it breaks:
    Link replacement, I believe. Probably more. I suggest using this method only when you want to take responsibility of the page output.

    From a cursory glance, it looks like W3TC uses multiple levels of buffering, depending on which features you enable for your site. This may mean that you will need to run ob_end_clean() multiple times. I believe the ob_get_levels() function would help with this.

    I hope this tip helps plugin developers. I’m curious to know if anyone tries it with any measure of success.

  • The topic ‘A tenative solution for the "How can I remove the footer comments" question’ is closed to new replies.