• Resolved AndrogenicAlopecia

    (@androgenicalopecia)


    Hi, I was really enjoying the Pagespeed increase via the use of Autoptimize. However, in trying to get closer to 100/100 on Google PageSpeed Insight, I tried out other caching plugings too (I tried out the 2 most popular ones on WordPress I think..1 at a time and not together), as well as a Google font optimization plugin recommended by Frank.

    A few days after this, I noticed that none of my comment totals were updating. The WordPress admin bar on top of the homepage would also not show up (sometimes it would after a refresh), although it showed up on other pages of my blog.

    Anyway, I removed both cache plugins as well as the Google font optimization plugin, bit my readers are still having issues with comment totals not updating. I also do not see the admin bar on top half the time until I refresh the screen.

    Any idea on what to do?

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Frank Goossens

    (@futtta)

    the google font optimization plugin is unlikely to have been the problem. any idea what the other one was?

    to fix; make sure all caches are cleared (page caching plugin, cloudflare if you have that, …). if the problem persists have a look at your browser console for javascript errors.

    hope this helps,
    frank

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    I think I tried both W3 Super Cache and WP Super Cache. Pretty sure I deleted all caches too.

    Anyway, it seems like the issues are getting less frequent and in the worst case I will delete my theme and reinstall it.

    Regarding browser console:

    I right clicked in Chrome, and then selected Inspect, and then browsed the Console menu in there. Way too many errors with there, although most of them relate to my Amazon and Google ad banners.

    There were a few “Failed to load resource: net::ERR_INSECURE_RESPONSE” errors and those also often have this to start off:

    https//vast.bp3857489.btrll.com/vast/3857489?n=[CACHE_BUSTER]…..

    Plugin Author Frank Goossens

    (@futtta)

    hmm … can you share your site’s URL so I can have a look?

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    Can I email it to you?

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    Just contacted you via your blog contact form FYI.

    Plugin Author Frank Goossens

    (@futtta)

    OK, had a look and I can see these 2 HTTP response headers;

    Expires:”Fri, 25 Nov 2016 06:28:33 GMT”
    Cache-Control:”max-age=1209600″

    This effectively tells the browser the page can (should) be cached for 14 days, which explains why your visitors don’t see the comment count or comments updated.

    Now the question of course is how those cache-headers got there, by default wordpress sends responses with Cache-Control:"no-cache, must-revalidate, max-age=0" so non-cacheable. This could be done by a plugin (disable/ re-enable each one you have) or at webserver-level (which would most likely be in your .htaccess-file, have a look there if you see stuff about “Expires” and spefically “ExpiresDefault“).

    hope this helps,
    frank

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    I really appreciate your taking the time Frank.

    I deactivated the four (Akismet, Google XML Sitemaps, Nomad World Map, Poll/Survey/Quiz/Form by OpinionStage) plugins that I have and then reactivated them. Will see how it goes.

    Plugin Author Frank Goossens

    (@futtta)

    those cache directives are still in the HTTP response androgenicalopecia, so that does not fix it and you can re-activate those plugins. time to look into the .htaccess now.

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    Ok I have never worked with an .htaccess file before.

    I just removed the WordPress theme that I was using, and then reinstalled it. Can you check one more time to see if that worked?

    I just checked on three different devices and it seems like the comment totals all came to the same updated number.

    Plugin Author Frank Goossens

    (@futtta)

    still see the same expires/ cache-control headers I’m afraid. to be clear, these only impact the browser cache, so you have to
    * load the page in browser 1
    * in another browser (2) approve a comment
    * reload the page in browser 1, and you should see the comment count updated and the new comment

    typically the cache-control headers are not something a theme changes and we’ve already ruled out the plugins. so what you’ll have to do next is checking the contents of the .htaccess file which is on your server in the wordpress-root directory (where e.g. wp-config.php is also located). feel free to copy/paste the contents of your .htaccess to a new paste pastebin.com and put link here (or mail it to me), I’ll have a look to see if anything in there is causing the cache-directives being added.

    frank

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    Hey Frank, I rechecked on all three devices I use and they all update fine with a new comment increasing comment total by 1. Anyway, here are some key sections of the htaccess file in case you see anything obviously wrong:

    .
    .
    .
    # BEGIN wtwp_cache
    # END wtwp_cache
    .
    .
    .
    ## END Enable GZIP Compression ##
    .
    .
    .
    .
    ## BEGIN Expires Caching (Leverage Browser Caching) ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access 2 week”
    ExpiresByType image/jpeg “access 2 week”
    ExpiresByType image/gif “access 2 week”
    ExpiresByType image/png “access 2 week”
    ExpiresByType text/css “access 2 week”
    ExpiresByType application/pdf “access 2 week”
    ExpiresByType text/x-javascript “access 2 week”
    ExpiresByType application/x-shockwave-flash “access 2 week”
    ExpiresByType image/x-icon “access 2 week”
    ExpiresDefault “access 2 week”
    </IfModule>
    ## END Expires Caching (Leverage Browser Caching) ##

    Plugin Author Frank Goossens

    (@futtta)

    yep, this is the culprit;

    ExpiresDefault “access 2 week”

    but if all works ok now, then just leave it be, no need to fix what ain’t broken, right ??

    have a nice evening!
    frank

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    All seems to work as far as comments go it seems.

    However, I just noticed that the WordPress Admin Toolbar on top disappears and I have to refresh to get it to come back on.

    Also, one of the other pages on the site was in yellow color because I used another theme, but the yellow went away after I refreshed that page.

    So it seems like still some issues :-((

    Do you know why the

    ExpiresDefault “access 2 week”

    got in there after I downloaded those cache plugins? Can third party plugins modify my site code or htaccess file?

    Do I need to change all those “2 weeks” expirations to something else within the htaccess file?

    Plugin Author Frank Goossens

    (@futtta)

    not sure if those other problems are due to those cache-directives, but I don’t think an ExpiresDefault of 2 weeks is a good idea, so I would suggest to simply remove that line (and only that line, the one that reads ExpiresDefault “access 2 week”) really. not sure how it got there, might very well have been a plugin indeed.

    Thread Starter AndrogenicAlopecia

    (@androgenicalopecia)

    Ok removed that line…but one of my friends just told me that he saw only 8 comments to the last post when there are 82. Then after browser refresh twice he saw 82.

    Hopefully this is just because he has not seen the blog for a few days, and after my removing the above line of code today, he will now be able to see the latest comment totals each time.

    Frank, out of curiosity, why did you not recommend removal of all the other sentences with “access 2 week” in the htaccess file and just recommended removal of that one sentence above?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Using 2 caching plugins messed things up, removing both plugins did not resolve’ is closed to new replies.