Support » Plugin: W3 Total Cache » Some files don´t get minimized and not compressed

  • Resolved docbt

    (@docbt)


    Hello,

    gzip and minimize is working on my site with most of my files, but it doesn´t work with 3 files (hosted on the same site like the other .js and .css).

    • /wp-content/plugins/jetpack/_inc/blocks/vendors~swiper.2b1609a7224e20d752be.css
    • /wp-content/plugins/jetpack/_inc/blocks/vendors~swiper.2b1609a7224e20d752be.js
    • /wp-includes/js/wp-emoji-release.min.js?ver=5.2.3`

    Is it because of the characters “~” and “?” in the URL?

    How do I fix this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @docbt,

    Thank you for your inquiry and I am happy to assist you with this.
    It’s not uncommon for some files not wanting to minify. It’s due to how some themes/plugins behave. Sometimes it needs to be adjusted how they included CSS/js files via dequeuing and requesting.
    For example /wp-includes/js/wp-emoji-release.min.js?ver=5.2.3 is never minified and if you look at the report could save 37B (1% reduction) after compression which means that there is no point minifying it.
    However, you can always switch to manual minify and use the Help Wizard to select the files that are not being minified.
    I hope this helps.

    Thanks for the quick reply, Marko! I see…

    Do you know why those three files are not gzip compressed?

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @docbt

    Can you please share your URL so I can check the GtMetrix report?
    I am guessing that your Minify JS and GZIP score is around 95-98?

    https://gtmetrix.com/reports/pescm.de/VIszwUJ5

    The minify is okay – the gzip compession is the bigger problem…

    • This reply was modified 3 months, 2 weeks ago by docbt.
    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @docbt

    I’ve inspected your page and it appears that Gzip compression is not working for static files. Static files are handled by nginx in this case, so you need to handle rules for that setup.
    In Performance>Install there are Nginx rules with which you can update your nginx.conf but that works only in a pure Nginx environment.
    If you are on nginx+apache, the nginx rules will not be there.
    Can you please share your ngix.conf?

    You can also add the additional rules to your nginx.conf:

    gzip on;
    gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
    gzip_proxied any;
    gzip_comp_level 5;
    gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;
    gzip_vary on;

    I hope this helps!

    I could solve my problem.

    If you are using nginx as reverseproxy before apache you have to disable options “Smart static files processing” and “Serve static files directly by nginx” (in plesk).

    https://support.plesk.com/hc/en-us/articles/115002418833-Optimization-test-tools-show-that-gzip-compression-is-not-enabled-for-a-domain-when-nginx-is-enabled

    Otherwise the apache gzip compressed files will be uncompressed by nginx and will be served without compression, which slows down your site dramatically!

    I could speedup my site from google PageSpeed Insights score 39 to 97 👍😊

    • This reply was modified 2 months, 2 weeks ago by docbt.
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.