Support » Plugin: W3 Total Cache » Minify doesn’t generate the minified assets

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Mos Craciun

    (@furioussnail)

    Nevermind. Looks like it isn’t working out of box (as Autoptimize does for example). Once I update the nginx settings it starts working just fine.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @furioussnail

    Thank you for the information. good thing I’ve refreshed the page as I was just about to suggest that.
    In some cases, the Nginx needs to be updated.
    Glad to know the issue is resolved!
    Thanks!

    Thread Starter Mos Craciun

    (@furioussnail)

    Looks like that actually doesn’t really help. cache/minify/ is still empty. So, most likely the nginx rules simply do redirect to some sort of dynamic assets generation.
    My best.

    Thread Starter Mos Craciun

    (@furioussnail)

    I have the following added to nginx:
    # BEGIN W3TC Minify cache
    location ~ /wp-content/cache/minify/.*js_gzip$ {
    gzip off;
    types {}
    default_type application/x-javascript;
    add_header Content-Encoding gzip;
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    add_header Vary “Accept-Encoding”;
    }
    location ~ /wp-content/cache/minify/.*css_gzip$ {
    gzip off;
    types {}
    default_type text/css;
    add_header Content-Encoding gzip;
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Referrer-Policy “no-referrer-when-downgrade”;
    add_header Vary “Accept-Encoding”;
    }
    # END W3TC Minify cache

    and

    # BEGIN W3TC Minify core
    set $w3tc_enc “”;
    if ($http_accept_encoding ~ gzip) {
    set $w3tc_enc _gzip;
    }
    if (-f $request_filename$w3tc_enc) {
    rewrite (.*) $1$w3tc_enc break;
    }
    rewrite ^/wp-content/cache/minify/ /index.php last;
    # END W3TC Minify core

    Thread Starter Mos Craciun

    (@furioussnail)

    Tried to simplify thing and disabled the “Browser Cache”. Made sure to have the following in the nginx config files:
    # BEGIN W3TC Minify core
    set $w3tc_enc “”;
    if (-f $request_filename$w3tc_enc) {
    rewrite (.*) $1$w3tc_enc break;
    }
    rewrite ^/wp-content/cache/minify/ /index.php last;
    # END W3TC Minify core

    No minified assets are being generated.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @furioussnail

    Thank you for the information.

    Can you please share the screenshot of the Performance>Minify? Do you have some .htaccess or Nginx conf file in /cache/minify/ folder?
    Are you on Apache + Nginx environment and are you using a proxy? also can you please share your website URL?
    Thanks!

    Thread Starter Mos Craciun

    (@furioussnail)

    In the end it looks like it was a configuration issue. All good now.
    However, it looks like Autoptimize is better at minifying the assets. With W3 Total Cache Minify the assets are broken while I don’t encounter such an issue with Autoptimize.
    Thank you.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @furioussnail

    Thank you for the information.
    We are already working on improving the minify feature.
    Thank you for your suggestion.

    Thread Starter Mos Craciun

    (@furioussnail)

    Another feature which would be quite nice is to minify and compress the assets but not combine them. That would help avoid breaking functionality in some cases while maintaining good performance with HTTP2 enabled.
    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Minify doesn’t generate the minified assets’ is closed to new replies.