• Resolved abitofmind

    (@abitofmind)


    Scenario:

    • T0: Plugin-X in use. Embeds its JS/CSS file(s) via <script> in all pages with src pointing to JS/CSS files inside its plugin folder.
    • T1: Page-A (among others) cached with JS/CSS resource references to Plugin-X folder in page markup.
    • T2: Plugin-X uninstalled, hence also its folder deleted.
    • T3: Page-A requested with cache-validation still serves the cached version from T1. Resulting in 404s because the JS/CSS file(s) were in the plugin folder which meanwhile got deleted.

    In such a situation: Who is responsible to purge pages with references to JS/CSS resources coming from plugins meanwhile uninstalled?

    1) Plugin X needs to trigger a certain mechanism?
    2) WordPress?
    3) W3TC? Which should detect that plugin X got uninstalled and thereby all pages which embed plugin X JS/CSS files need to get purged?
    4) Or is there currently no architecture for this? And hence the admin’s responsibility to purge the entire cache after uninstalling a plugin which is known to put JS/CSS resource references into the markup of cached pages?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @abitofmind

    Thank you for reaching out and I am happy to answer.

    The answer is 4. ?there currently no architecture for this
    Once any plugin is updated. disabled or activated, you will het the W3TC notification:

    This is the safest and the best way for this to assure that once any plugin is disabled, or activated, and may not use any actions to flush the cache, to purge the cache manually.

    I hope this helps!

    Thanks!

    Thread Starter abitofmind

    (@abitofmind)

    Thanks for confirming my suspicion (nr.4).

    Good UX that you monitor plugin de/activations and throw a warning!

    I have missed that warning. Now that I consciously watched out for it I can confirm it works reliably. Whenever I de/activated it showed the warning. Whenever I then clicked “Hide this message” it no more warned until the next real de/activation.

    Thread resolved. Thanks!

      Thread Starter abitofmind

      (@abitofmind)

      This spawned another improvement idea which I submitted to your Github: Proposal: W3TC gives recommendation to purge caches when changing Site Title (aka blogname)

    Viewing 3 replies - 1 through 3 (of 3 total)
    • The topic ‘My duty to purge caches if uninstalling plugins with JS/CSS references in pages?’ is closed to new replies.