Support » Plugin: SG Optimizer » Legacy Impact of Plugin when Deleting

  • My problem is the opposite of what SG Optimizer was designed to do. For the past few months I have discovered that my pages were being served from browser cache instead of being refreshed from the server. All my efforts to use meta tags in the header of the page was failing. I contacted Site Ground who cleared their own cache and it seemed to help for me for a short time (say 1 hour) but then the problem restarted.

    I tried embedding meta commands in the head section of the pages to prevent browser caching on selected pages but they were being ignored.

    I then had the bright idea: install SG Optimizer and nominate these pages as exclusions. But that was ignored by the browser.

    I deactivated SG Optimizer and deleted my meta commands from head to try to get back to the beginning. I’ve tried a lot of things in the meantime but they had no effect. The problem persisted.

    Today I had a look at the .htaccess file. I was shocked to find a huge chunk of code that was overriding everything I tried to do in HTML. That chunk of code was a legacy of installing SG Optimizer. Perhaps you could find a way to delete the code when the plugin is deleted or at least to alert the person deleting the plugin to remove it manually?

    I’ve deleted that chunk of code from .htaccess.

    Now I can restart my quest to find a way to stop browsers serving up cached pages that are completely out of date. I’m experiencing this both on Chrome and Firefox. It only started to be a problem about Sep or Oct 2019. Does that coincide with any event at SiteGround? Did they move from Linux to NGINX around that time? Before the change, all my embedded PHP snippets (Woody Snippets) were being executed each time the page was opened. Now they are completely ignored and an old copy of the page appears.

    My latest attempt to fix this to try sticking HTML meta tags in the head section. For example:

    <meta http-equiv="expires" content="Sun, 01 Jan 2014 00:00:00 GMT"/>
    <meta http-equiv="pragma" content="no-cache" />

    I was surprised to find that this seemed to be working once I removed all the legacy code from .htaccess left by the plugin. I’d hate to think that I have to do this for all dynamic pages on my website but I’ll do what I need to do to fix this annoying problem.

    • This topic was modified 3 weeks, 3 days ago by dccharron.
  • You must be logged in to reply to this review.