Support » Plugin: Social » W3 Total Cache and Thematic Theme

  • Not 100% sure on which side the problem is but I noticed that the Total Cache Plugin “breaks” the body class in the Thematic WP Theme. Once the Plugin is activated all browsers return the last browser name as CSS class in the body tag. Any help on this would be appreciated. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Nicolas –

    We develop using Thematic quite a lot, so I am interested in seeing if I can help you get to the bottom of this. It may be the specific “flavor” of the caching plugin you are using. We use W3 Total Cache, and I don’t think the same problem results. Learn about this plugin here:

    But if that is the same plugin you use (there are others with similar names), then take a look at one of our client’s sites where we have it in use:

    If I look at page source for that site, I see:
    <body class="wordpress blogid-1 y2011 m12 d31 h22 home singular slug-home page pageid-159 page-author-webfadds page-comments-closed page-pings-closed page-template page-template-NoTitlepage-php mac firefox ff1">

    Is this what you did not like? It is actually a very powerful way to take control of what displays on different pages, templates, and even in different browsers. Since each browser gets a class assignment, you could show a different background to people using different browsers, for example, using CSS.

    This is not due to W3 Total Cache… these classes are available even without it.

    Cheers –

    Any updates?

    @sfrangos – thanks for your input! We do use W3 Total Cache for that particular project. I understand the body class isn’t a Plugin issue itself. But what we had as output compared to yours is that instead of just having “mac firefox ff11” show up the body class would have the name of the last used browser in the tag.

    I also noticed that this was somewhat “random” and I couldn’t really get to the bottom of the problem myself…also because this is a pro bono project and I donate time to them whenever they need it the most. So I have been off and on for the past few weeks.

    I will have to dig back in there sometime soon to look at this again. Because it was mainly for some IE fixes where I wanted to take the easy route, I was able to do some other things to work around it.

    Once I get time to look at this, I will post back. Thanks!

    Standing by.

    Andy Leppard


    I’m using a child theme with Thematic and W3 Total Cache, and I’ve experienced the same issue as Nicolas.

    When Page Caching is enabled, W3 Total Cache serves a copy of the page which includes Thematic’s body classes from the instance when the cache file was first created – I see that after the cache has been emptied, then first viewing my test site in IE8 on Windows and subsequently viewing it in Mac OSX Safari, the browser specific body classes are defined as “windows”, “msie” and “ie8”.

    I’ve checked out the example site provided by sfrangos (, and this issue is not present – are you using Page Caching sfrangos?

    I use the Thematic body classes extensively to deliver page-specific styles, not so much for browser tailored css, but where I do , it’s usually quite important.



    Hello Colleagues –

    To summarize the problem, we are discussing how use of some caching plugins renders a body class reflecting the last browser captured by the cache… not the true last browser, if I am correct. That would indeed make it difficult to perform browser based style delivery.

    @andy – We recently had a conflict with a security plugin that over wrote the .htaccess code, so when you looked at, we were not using page caching. I have just now put it back in play so have a look in a bit.

    I am thinking now that by the nature of caching we will still have a problem with intermittent (depends on the time setting for the cache) problems with capturing the browser class in the body tag. I believe this is the only class that should be in jeopardy.

    – Scott



    hi scott!! this is totally just an issue of “caching” something that is meant to be dynamic. it really isn’t a problem with either w3c or thematic. it is how they are supposed to behave, their behaviors are just at odds with one another.

    karin and i did not deprecate the browser-specific body classes, but i kind of think they should be dropped. IE-specific targeting should be handled by conditional comment classes, à la html5 boilerplate and i’m not aware the other browsers really need specific targeting?

    Andy Leppard


    Thanks Helga – I’d come to the conclusion that caching and browser-specific body classes are not mutually compatible.

    I’ve been using them out of convenience, not because they are the best method for browser-specific styles.

    Thanks for your input, and I have to agree that dropping them from Thematic is a good idea, just don’t drop any of the post, template or taxonomy body classes!

    @nicolas & @scott – I think we can call this one resolved.

    Frederick Townes


    Thanks for the clarification on this one. Agree, consider this “resolved.”

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘W3 Total Cache and Thematic Theme’ is closed to new replies.