Support » Plugin: Autoptimize » 404 errors

  • Resolved lozula

    (@lozula)


    Hey Frank,

    So I’ve noticed a few 404 errors in my web logs for the css and js files that autoptimize generates. I read through this useful topic:

    https://wordpress.org/support/topic/404-errors-86/

    And realised I’ve been clearing the cache when I updated my css files when I don’t need to be doing that. Oops.

    So I’ve cleared out caches where I can (cloudflare, server cache etc).

    I still see the 404 errors, and I’m wondering if this is due to pages being cached in places I can’t clear.

    I don’t know how this might impact users browsing the site or if it’s just a bot thing. I noticed someone suggested putting a 410 redirect in place for those autoptimize files in my 404.php which seemed sensible.

    Then I wondered if it might make more sense (tell me if I’m wrong please) to put a 301 redirect in place to the location of the new AO files when a 404 happens that matches the old files. If so, what the easiest way to retrieve the url of the existing AO css and JS?

    Apologies if this doesn’t make sense or I’m misunderstanding something 🙂

    Laurence

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Based on all other mentions of this issue, this only occurs for GoogleBot visits which seem to be using a version of your site from the Google cache, so 410 would be the correct way to go. 30x would not work, as you can’t really know what file to redirect to.

    all in all, I wouldn’t be too worried about this 🙂

    frank

    lozula

    (@lozula)

    Thanks for the quick response as always Frank 🙂

    The 404 errors are not all from the Googlebot in my case. For example:

    “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15”

    404 11512 “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0)”

    There are quite a few in the logs. Would this be from a local browser cache, or something else? I guess there’s not much I can do about it?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    If you’re sure you’ve cleared all page caches (can be at plugin level, at server level, at a 3rd party such as cloudflare or sucuri) then indeed this probably from a browser cache and there’s nothing you can do about that I’m afraid.

    lozula

    (@lozula)

    Ok, good to know. Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.