WordPress.org

Forums

[resolved] WP Super Cache reverses design changes (11 posts)

  1. pcmt
    Member
    Posted 5 years ago #

    I've regrettably had to deactivate WP Super Cache for the time being.

    The page caches are regenerated with each hit, as has been noted on previous threads, but of more concern is that when WP Super Cache is activated, the website's pages when viewed tend to revert to a previous version of the design (but not to previous content). This happens even when the cache has been manually deleted several days ago. When I deactivate or elect not to cache, all is fine.

    WordPress 2.8.4 and latest release of WP Super Cache. I use very few other plugins.

  2. Donncha O Caoimh
    Member
    Posted 5 years ago #

    That's a strange bug. The plugin doesn't do anything to the theme options. Is the previous design a different theme in a different directory or the current theme without current updates?

  3. pcmt
    Member
    Posted 5 years ago #

    I don't know if it's a bug in WP Super Cache or some other caching issue. I've been using the same Theme for a while. What is happening is not Theme-related as such. For instance a few weeks ago I added some JavaScript to my standard footer, and also installed Mint tracking using auto_prepend_file in .htaccess, which puts a script in the header. Then I made some changes to the stylesheet - stuff like that. In amongst all this I installed WP Super Cache as well.

    When I enable WP Super Cache those structural changes are not always visible when viewing pages in a browser - the design sometimes (but not always) reverts to pre WP Super Cache. But when I turn off the plugin, the latest design is always there. It's some kind of caching issue but I don't know what.

    I turned it off for two weeks to see if old bits got flushed way, then enabled the plugin again. But still - in Opera especially - the old design pops back up. Same for visitors, as I can tell when Mint stops tracking because the JavaScript disappeared again from the header.

  4. Donncha O Caoimh
    Member
    Posted 5 years ago #

    Is your old theme still on your site? What happens if it's deleted? When the old design shows is old content shown too?

  5. Why don't you just clear the cache manually? There's a button in WP-Super-Cache to do just that.

    It can't cache anything from before you hit the clear button. That would involve time travel. :)

  6. pcmt
    Member
    Posted 5 years ago #

    donncha, I don't really have an old Theme. I use the Theme I've developed bit by bit since 2005. The Default Theme is still there in the folder but never been used.

    Otto42, I've cleared the cache every which way I know, including manual deletion. Cleared the browsers cache too.

    I can more or less guarantee that if I wait a couple more weeks then reactivate WP Super Cache, I and a proportion of my visitors won't be recorded with Mint because the JavaScript that is supposed to be in the header will be missing. The odd thing is that if I add the JS manually into the WP header, the problem goes away, but using auto_prepend_file in .htaccess to add the JS, it isn't always there when WP Super Cache is activated.

  7. pcmt
    Member
    Posted 5 years ago #

    With WP Cache and Super Cache enabled but compression disabled I seem to have no problem. When I see (at the bottom):

    <!-- Dynamic page generated in 0.659 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2009-10-15 10:48:57 -->

    OR:

    <!-- Dynamic page generated in 0.414 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2009-10-15 11:03:54 -->
    <!-- super cache -->

    ... my header includes:

    <![endif]-->
    
    <script src="/mint/?js" type="text/javascript"></script>
    
    </head>

    ... as it should.

    But when the bottom shows:

    <!-- Dynamic page generated in 0.683 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2009-10-15 10:44:40 -->
    <!-- Compression = gzip -->

    the Mint JavaScript doesn't show. So it seems that somehow, with compression, auto_prepend_file in .htaccess doesn't function. That's all I can think of really.

  8. pcmt: Is this "mint" thing designed to not count *you* as a visitor to the blog?

    Because you, as a logged in user, will get different page results from WP-Super-Cache than a non-logged-in (anonymous) user. You are each served from different caching mechanisms.

    General rules:
    1. Only anon users can get the <!-- super cache --> page.
    2. Logged in users, or users who leave a comment, get a normal WP-Cache style page, which is unique to them. It's generated and cached, but the cache is only valid for that individual and only that individual will see it. The speedup here comes from if they visit the same page twice.
    3. Whether gzip is used or not is irrelevant to everything, as that is merely a matter of whether or not their browser supports gzip encoding.

    So if this mint thing is designed to not log your visits, then you would not see the javascript on pages generated for you, but might still see them on pages generated for anon users. To see an anon user page, clear all your cookies (or use a different browser with no cookies for that page) and then view the page there.

  9. pcmt
    Member
    Posted 5 years ago #

    Otto42: thanks for the reply.

    I have set Mint not to track my visits but the Mint JS should appear in the header even so. The "revert to a previous design" phenomenon (of my WordPress blog) really does seem to occur when compression is enabled in WP Super Cache (strange though it may seem). It happened after I changed my sidebar and CSS file. Quite some while later, I would see the previous design, especially in Opera and IE - less so in Firefox. And it happens only when auto_prepend_file in .htaccess is used to add the Mint JS to the header, never when the JS is added manually to the header file.

    Everything seems to be okay now, with compression disabled. So I'll leave it for a week or so and enable it again and see what happens. The issue, if there still is one, may perhaps be related to the behaviour of my server.

  10. Oh. You shouldn't use auto_prepend_file and compression at the same time. They are mutually incompatible.

    In fact, I can't think of why anybody would ever use auto_prepend_file for anything related to WordPress. It'd likely be incompatible in general.

    If you want to add JS to WordPress output, you should be using wp_enqueue_script in a plugin or theme or some such similar place.

  11. pcmt
    Member
    Posted 5 years ago #

    You shouldn't use auto_prepend_file and compression at the same time. They are mutually incompatible.

    Many thanks. Mystery solved.

    I'm using auto_prepend_file because I have dozens of non-WordPress pages on the website and didn't want to have to edit each one to add Mint. Without compression all seems ok, but I'll need to have a rethink for the long run.

    WP Super Cache is an impressive plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic