• Um, I guess this is more of a feature request, but in light of my perception that the author of WP Super Cache is acutely security oriented, and that Bad Behavior is the bees knees (if running properly, and in conjunction with another, e.g. Akismet) I’m wondering if / why not support for Bad Behavior according to the trivial pertinent mod could be built into WP Super Cache as well, with one of those nifty if function exists calls…

    I have several pro bono org blogs I’m trying to keep up-to-date, and let’s just say my imaginary interior decorator is complaining about the Post-It notes reminding me to manually update WP Super Cache whenever an update of that fantastic plugin becomes available. ??

    https://www.ads-software.com/extend/plugins/wp-super-cache/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Alvaro Degives-Mas

    (@nv1962)

    I’m not crazy, just talking to myself here, ‘sall! ??

    I found WP Super Cache already has support for Bad Behavior built into its “in development” version, via a plugin, in the trunk repository. Which is very cool.

    Unfortunately, that plugin is looking for a directory titled “Bad-Behavior” which is less cool, as it’s typically called “bad-behavior” e.g. when installed via the WP plugin installer (note: case matters).

    Suggestion for the author: perhaps include a case-indifferent check on BB’s presence or absence? (I manually changed the directory to what the WP Super Cache was expecting, but I have a hunch now that a future BB plugin update will meet resistance because of that…)

    Otherwise, the trunk version is now humming along…

    nv1962 – interesting. The code I read on the BB website has capital letters which is why it has caps. I guess some installs have one and others have the other.

    Yeah, my install (and I suspect everyone else’s) is lower case, so I think the code should be changed to reflect this. Also, the plug-in settings page uses English English (“Bad Behaviour”), whereas the plug-in name (and your code) uses American English (“Bad Behavior”), which could be confusing to people who try to change the directory name themselves.

    Anyway, thankyou very much Donncha for adding this compatibility code!

    Thread Starter Alvaro Degives-Mas

    (@nv1962)

    Hi Donncha – the lowercase version is what one gets via the WP plugin repository (and therefore also via automated plugin installs / updates). I just now checked at Michael’s place, but that delivers a lowercase version, too. Maybe that’s a legacy version issue because I too remember once having a capitalized BB folder.

    Good catch by Ljmac, too BTW – I noticed the spelling difference too, a few days ago but failed to mention the anecdote here. However, the plugin itself isn’t affected by Her Majesty’s English.

    Indeed, it should be lowercase. If it’s in mixed case on my site, then that’s an error that should be fixed, but no one ever brought it to my attention.

    Thread Starter Alvaro Degives-Mas

    (@nv1962)

    Hmmm… Let’s see if I understood things correctly:

    – WP Super Cache since v0.9.1 transparently supports Bad Behavior (although it does require that the BB directory is in uppercase)
    – to work with BB, WP Super Cache needs to be set to “HALF ON” meaning, essentially, that cached pages run through the PHP caching system (as opposed to the “direct” HTML file caching system used when WP Super Cache is set to (full) “ON”
    – the author of Bad Behavior indicates a different method for integration with WP Super Cache, by way of modding one single line, allowing for protection also of cached files.
    – there are, therefore, two methods of using Bad Behavior and WP Super Cache together: either via PHP caching mechanism, or via the webserver file caching system (thus serving up “fully static” files).

    Now, if I understood it correctly, wouldn’t it be better to use both mechanisms? I.e. allowing for “full on” caching as well as protecting the resulting cached files? So, wouldn’t including that “conditional call” I suggested at the opening (which also is verbatim the BB author’s recommendation) be a more server-footprint efficient method rather than loading the PHP engine?

    (Added later: I switched this topic back to “not resolved” pending final clarification)

    Actually, The Bad Behavior mod only works with PHP cached files as well – there is no way for Bad Behavior to protect static cache files, as it is PHP based. Hence, the method built into WP Cache 0.9.1 works just as well as the old mod, but is obviously a lot easier for the user to implement (as they don’t have to modify WP Super Cache with every new release).

    The old mod may allow you to use it in Super Cache mode, but it can only protect the PHP cached files in any case. Hence, if you want to use Bad Behavior with WP Super Cache, using the latter in “half on” mode is the only way to protect your entire blog. Hence, forcing it to switch to “half on” mode when you use it with Bad Behavior is the right thing to do IMHO.

    Thread Starter Alvaro Degives-Mas

    (@nv1962)

    Aha! Now that makes perfect sense. Thanks ljmac for clarifying things in a comprehensible manner for me!

    So back to “Resolved” this topic goes, again.

    can we use gzip compression when using super cache and bb together?

    jp8zc12d – You have to run the plugin in half-on mode. Any gzipping is done automatically if your browser supports it. Don’t worry about it.

    I’ve been using both of these together and they have been working perfectly. I am in the process of moving to a dedicated server, I hope everything keeps playing nice once I make the move lol.

    I wonder if it’s better to half the half-on mode so that BB works across the entire blog or if it’s better to use full html caching where I assume BB would still work when/if robots try to hit PHP pages (like posting comments).

    Whether to use half-on or full-on mode is up to you. I use both modes on various different sites, all of which also use Bad Behavior.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Support for Bad Behavior standard in WP Super Cache?’ is closed to new replies.