• Resolved Anonymous User 14978628

    (@anonymized-14978628)


    Hey Frank,

    I’ve been getting a few 404 errors recently for AO css and js files. These are AO files in the wp-content cache directory.

    Not sure why this is happening or what to do about it?

Viewing 15 replies - 16 through 30 (of 35 total)
  • Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Guess it’s best left alone then! Thanks ??

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    I just wanted to update this thread for anyone who is having a similar problem.

    I returned a 410 gone response for the AO files that no longer exist, but to this day Google still requests them, and is still getting the 410 response.

    I thought Google would stop requesting the files after a short period of constantly getting the 410, but apparently not.

    I’ve currently had to block the files in htaccess to return a 403 response.

    I have been getting 404s through redirection for some time, as soon as i first cleared cache on autoptimize. The anal in me also wants to “sort it out”, but it doesnt make any difference to google. Obviously, these dont show up in search console… (or yoast if you are using), it’s just that it creates a lot of pages of 404’s on redirection. Setting a 410 doesnt mean that google will immediately stop trying so far as i know… it apparently will take place that they stop looking over a good few mmonths.

    So, i guess best option is Franks original one: just leave the 404s in redirection.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    @optimizingmatters

    Hey Frank, I discovered that the following code is in my social media plugin and theme by Elegant Themes.

    // Complimentary Performance Plugins
    		// Autoptimize
    		if ( is_callable( 'autoptimizeCache::clearall' ) ) {
    			autoptimizeCache::clearall();
    		}

    It couldn’t be overridden using a child functions so i had to edit the parent templates directly. This is obviously not ideal as those modifications can be replaced when updating the theme/plugin.

    I’m trying to explain to support why having this code is a bad idea as it appears to be clearing the AO cache every time i publish a new post.

    Could you please confirm, and also so i could give them your response, that clearing the AO cache can result in 404 errors occurring due to the AO css/js files.

    They tested this on localhost and found the css/js did not change for that post. But i noticed that sometimes the AO file names changed after clearing the cache, and sometimes they didn’t.

    Thanks.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I can officially confirm that the act of adding a new post or page does not require the AO cache to be cleared. Even new or updated CSS or JS should not require the cache being cleared, as AO “sees” something changed and will create a new file in cache with the new code ??

    as such the code to purge AO’s cache is useless and I would indeed even consider it harmful (as it slows down your site because the cache will need to be re-populated).

    Feel free to tell Elegant Themes they can contact me at frank-at-optimizingmatters-dot-com if they need more info!

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Hey Frank,

    I passed along your response to the support member.

    They said to ask you to confirm what the following function does as they said they are only using your API and the functions you provide:

    autoptimizeCache::clearall();

    They also said after testing, that the AO files don’t seem to change when creating new posts. Though they didn’t say if they are testing with a caching plugin also enabled:

    I confirmed several times that the files don’t get refreshed with the usual WordPress operations (new post / updated post, etc)

    Can you comment on this also please?

    Thanks!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    autoptimizeCache::clearall(); purges AO’s cache entirely and will cause many page caches to auto-purge at that point as well (as AO and many page caches are integrated). the code snippet your provided does not show under which circumstances clearall is called, but it clearly should not be called when a post is published/ updated, … ??

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Full code:

    // Complimentary Performance Plugins
    // Autoptimize
    if ( is_callable( 'autoptimizeCache::clearall' ) ) {
    autoptimizeCache::clearall();
    }

    also:

    https://gist.github.com/FinalDestiny/cca603a238ed3bb3ecb0ce33c7b54075

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    so it’s called unconditionally? that’s … bad ??

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Not sure if you saw as i added in an edit.

    But the url shows the code in full context.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    interesting, they purposely clear page cache’s as well, seems rather extreme. so the question is; when does the function et_core_clear_wp_cache get triggered?

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Sorry, I’m unclear whether the following is still the case?

    so it’s called unconditionally? that’s … bad

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no, the question at hand currently is;

    when does the function et_core_clear_wp_cache get triggered?

    ??

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    The function gets called when a post is saved

    I think it also gets called when post is published, but still waiting to hear back about this.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, in my opinion that is no reason to do so; page caches know when posts get published or updated and act accordingly without a 3rd party plugin doing so.

    and purging AO is … useless (and counter-productive) as AO’s aggregated CSS & JS does not need to be updated when a post get published as a new or updated post does not result in new CSS or JS being added (and even if: AO knows when new CSS/ JS is added and will create new cache entries automatically, no need for cache purging).

    And regarding;

    they are only using your API and the functions you provide

    When in an airplane I am provided with a live-vest, but I am not really supposed t put it on and inflate it, am I? ??

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘404 Errors’ is closed to new replies.