Forum Replies Created

Viewing 15 replies - 1 through 15 (of 154 total)
  • G

    (@gnetworkau)

    Unfortunately thats how Google works, and there is not much you can do about it.
    Expect any temporary type files to remain indexed by Google for months after they have been deleted.

    G

    (@gnetworkau)

    If you are on Apache server and can edit your .htaccess file, follow my post here:
    https://wordpress.org/support/topic/fvm-htaccess/#post-11399889

    G

    (@gnetworkau)

    G

    (@gnetworkau)

    Ok Angus, you can try adding problem CSS/JS to “Ignore List” on the “Pro” tab.
    As for the gzip and brotli compression, see below for my crafted htaccess directives which are the best I have seen!
    Add them to htaccess before the WordPress default and caching directives.
    These directives (incl cache control) will serve compressed css,js and html files, in this order:
    – Precompressed Brotli (if file exists and clients accepts)
    – Precompressed Gzip (if file exists and clients accepts)
    – On-the-fly Compressed Brotli (if server enabled and clients accepts)
    – On-the-fly Compressed Gzip (if server enabled and clients accepts)
    – Uncompressed (if client does not accept compressed file format)

    # ===== BEGIN BROTLI =====
    # BROTLI Dynamic - Server Generated on-the-fly
    <ifmodule mod_brotli.c>
        AddOutputFilterByType BROTLI_COMPRESS text/html text/css text/javascript text/plain application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss
    </ifmodule>
    <IfModule mod_headers.c>
    # BROTLI Static - Precompressed
    # Serve Brotli compressed HTML, CSS and JS files if they exist and the client accepts brotli.
        RewriteCond "%{HTTP:Accept-encoding}" "br"
        RewriteCond "%{REQUEST_FILENAME}\.br" "-s"
        RewriteRule "^(.*)\.(html|js|css)"              "$1\.$2\.br" [QSA]
    # Serve correct content types, and prevent double compression.
        RewriteRule "\.html\.br$"  "-" [T=text/html,E=no-brotli:1,E=no-gzip:1]
        RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1]
        RewriteRule "\.js\.br$"  "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1]
      <FilesMatch "(\.html\.br|\.js\.br|\.css\.br)$">
    # Serve correct encoding type.
        Header append Content-Encoding br
    # Force proxies to cache compressed/uncompressed files separately
        Header append Vary Accept-Encoding
      </FilesMatch>
      <FilesMatch "(\.js\.br|\.css\.br)$">
    # Cache Control and Enable CORS
        ExpiresActive On
        ExpiresDefault  "access plus 1 month"
        Header set Cache-Control "public, immutable, max-age=2628000, s-maxage=2628000"
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    # ===== END BROTLI =====
    
    # ===== BEGIN GZIP =====
    # GZIP Dynamic - Server Generated on-the-fly
    <ifmodule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/css text/javascript text/plain application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss
    </ifmodule>
    # GZIP Static - Precompressed
    <IfModule mod_headers.c>
    # Serve gzip compressed CSS and JS files if they exist and the client accepts gzip.
        RewriteCond "%{HTTP:Accept-encoding}" "gzip" [OR]
        RewriteCond "%{HTTP:Accept-encoding}" "deflate"
        RewriteCond "%{REQUEST_FILENAME}\.gz" -s
        RewriteRule "^(.*)\.(html|js|css)"              "$1\.$2\.gz" [QSA]
    # Serve correct content types, and prevent double compression.
        RewriteRule "\.html\.gz$" "-" [T=text/html,E=no-gzip:1,E=no-brotli:1]
        RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1]
        RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
      <FilesMatch "(\.html\.gz|\.js\.gz|\.css\.gz)$">
    # Serve correct encoding type.
        Header append Content-Encoding gzip
    # Force proxies to cache compressed/uncompressed files separately
        Header append Vary Accept-Encoding
      </FilesMatch>
      <FilesMatch "(\.js\.gz|\.css\.gz)$">
    # Cache Control and Enable CORS
        ExpiresActive On
        ExpiresDefault  "access plus 1 month"
        Header set Cache-Control "public, immutable, max-age=2628000, s-maxage=2628000"
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    # ===== END GZIP =====
    G

    (@gnetworkau)

    FVM does not add anything to .htaccess.
    What helps speed on my server (a lot), is adding good directives for gzip and brotli compression, both for precompressed and on-the-fly compression. If you feel comfortable adding these to htaccess, reply here and I will post them. Not sure if this will help in your case, but I think this is the most overlooked tweak on WordPress servers.

    G

    (@gnetworkau)

    I put it before the default code.

    G

    (@gnetworkau)

    @alignak thanks for clarification Raul. I will do custom path for each site, all inside one cache directory. The reason I prefer this, is that if there are any problems clearing cache, I can use ftp and delete in just one directory.

    G

    (@gnetworkau)

    Raul, the 2.6.0 works ok. Without option “Preserve Cache Files [ This will reload your cache files when you purge, but preserve the old files ]” – how will it preserve the files?

    For your information, on my multisite the URL format is like so:
    https://domain.com/wp-content/cache/cache/fvm/1551567105/out/header-944e32cb.min.css
    Notice the /cache/cache/…

    In settings I have “Cache Location”
    Cache: /home/user/public_html/wp-content/cache
    Path: https://domain.com/wp-content/cache

    G

    (@gnetworkau)

    You need to follow Frank’s advice to fix:
    https://wordpress.org/support/topic/autoptimize-make-urls/#post-11214851

    There are problems with your WordPress/php setup, it is not the fault of Autoptimize or Supercache. Track it down yourself, or you may need to hire a developer.

    G

    (@gnetworkau)

    Works fine now, thanks!

    G

    (@gnetworkau)

    Best way is to add something like this to your htaccess file:

    # Cache Control and Enable CORS
    <FilesMatch "\.(js|css|jpg|gif|png|pdf|swf|svg|svgz|ico|ttf|ttc|otf|eot|woff|woff2|webp)$">
     <IfModule mod_headers.c>
        ExpiresActive On
        ExpiresDefault  "access plus 1 month"
        Header set Cache-Control "public, immutable, max-age=2628000, s-maxage=2628000"
        Header set Access-Control-Allow-Origin "*"
     </IfModule>
    </FilesMatch>

    If you don’t know how to do that, try this plugin should do the job:
    https://wordpress.org/plugins/far-future-expiry-header/

    G

    (@gnetworkau)

    I don’t think Supercache was designed for this. If your pages are taking longer than 20 seconds to load, you may need to clean up your code, plugins, etc. as most visitors won’t wait that long.
    I guess you may be running into timeout issues…

    G

    (@gnetworkau)

    Your sight seems slow.
    You need to find out why the js file in the second screenshot is 403 Forbidden – it is the reason why page keeps loading/waiting. CDN issue perhaps?

    G

    (@gnetworkau)

    Yes you can simply delete the files.

    I don’t do it via php, but you can, check here.

    For clearing cache of individual pages, sites, or entire cache – when needing to refresh content – I use cronjobs. Commands like these will do the job:

    Clear entire cache
    rm -rf /full/path/to/wp-content/cache/supercache >/dev/null 2>&1
    Clear cache of one site
    rm -rf /full/path/to/wp-content/cache/supercache/domain.com >/dev/null 2>&1
    Clear cache single page
    rm -rf /full/path/to/wp-content/cache/supercache/domain.com/some-url >/dev/null 2>&1

    NOTE: Make sure to use the full path
    Added >/dev/null 2>&1 at end of command to stop feedback from cron

    G

    (@gnetworkau)

    Is this a Supercache issue? Does the site load fast without Supercache enabled?

Viewing 15 replies - 1 through 15 (of 154 total)