• Resolved mountbatt

    (@mountbatt)


    If i block the caching directory via robots.txt the Google mobile friendly check has no chance to reach my .css or .js resources.

    But i wrote this code to allow all .css and .js resources and also the ones with ?ver=6.2 (etc) parameters.

    User-agent: *
    Disallow: /wp-content/cache/cachify/

    User-agent: *
    Allow: /wp-content/cache/cachify/.js$
    Allow: /wp-content/cache/cachify/.css$
    Allow: /wp-content/cache/cachify/.css?
    Allow: /wp-content/cache/cachify/.js?
    Allow: /

Viewing 1 replies (of 1 total)
  • Cachify does not generate any CSS/JS files in the cache directory, there are just cached HTML files that must not be accessed directly.

    If I look at the cached contents, e.g. /wp-content/cache/cachify/index.html I do see the original JS/CSS ressources in the markup, e.g. <link rel='stylesheet' id='wp-block-library-css' href='https://mysite.test/wp-includes/css/dist/block-library/style.min.css?ver=6.2' media='all' />

    If that’s not the case on your site, there might be a different problem. IIRC Cachify never should have done such thing…

    My guess is that the issue has nothing to do with the robots.txt (at least not with the default generated one) or any CSS/JS insinde the “cachify” directory at all. Google most likely complains about missing cachability of the resources, e.g. missing Expires header to tell the browser that the file should be cached.

    Maybe you could share a link if the site is publicly available, so we might actually see the issue.

Viewing 1 replies (of 1 total)
  • The topic ‘Pass mobile friendly check’ is closed to new replies.