Issue with fallback CSS
-
Hello! Frank, hope you’re very well.
While crawling site with ScreamingFrog I noticed 404 for the AO resources.
Case 1. When I checked one URL manually, it returns 200 with CSS
Can’t seems to understand why there was 404 before but now 200 for same path?Case 2. For another URL, it returns blog archive with latest posts.
Ideally, it should be CSS or 404 not HTML page.Request URL: https://www.example.com/wp-content/cache/autoptimize/css/autoptimize_ab95e36a15f6054115f825914454b74f.css Request Method: GET Status Code: 404 Remote Address: REDACTED:443 Referrer Policy: strict-origin-when-cross-origin Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private Content-Encoding: gzip Content-Type: text/html; charset=UTF-8 Date: Mon, 14 Aug 2023 08:03:44 GMT Expires: Wed, 11 Jan 1984 05:00:00 GMT Location: /wp-content/cache/autoptimize/css/autoptimize_fallback.css Server: nginx Server-Timing: wp-load-alloptions-query;dur=2.52, wp-before-template;dur=45.93 Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Vary: Accept-Encoding X-Redirect-By: WordPress X-Ua-Compatible: IE=edgeI am using NGINX Helper. Do I need any special config?
Sometimes Autoptimized JS/ CSS is referenced in cached HTML but is already removed, resulting in broken sites. With this option on, Autoptimize will try to redirect those not-found files to “fallback”-versions, keeping the page/ site somewhat intact. In some cases this will require extra web-server level configuration to ensure
wp-content/autoptimize_404_handler.phpis set to handle 404’s inwp-content/cache/autoptimize.Thanks & Regards,
Gulshan
The topic ‘Issue with fallback CSS’ is closed to new replies.