Is this Solution for Caches vs Cookies Going to Get Me in Trouble?

Your solution with comment_author_proxyhash cookie will of course technically work – all caching plugins I know doesn’t analyze hash value and will just stop delivery of cached content based on comment_author_* cookie presense.

Problem here is that page caching functionality is something websites really need and often page caching is configured exactly because naked WordPress performance is not enough and able to even crash server at peak times. It depends on website content nature, but site owners sometimes just not able to pay for hardware required to handle everything via PHP/WP code.
In other words as much as possible traffic has to be served from page cache whenever possible.
From practice I may tell that we often have to identify and disable plugins doing cache exceptions.

Of course it’s not always possible, but try to work with cached page whenever possible. For example you may hide div tags with comments you want to ignore via javascript, or ajax-ify whole comments block.

In any case you don’t need to mark visitor as a commenter, but stop caching because of your custom logic reasons. So it’s better to use unique cookie and make it a cache exception signal.
W3 Total Cache has “Reject cookies” option for that, but not other plugins from your list so you’ll need a hack like one you have suggested.

Leave a Comment