• Resolved craigmilam

    (@craigmilam)


    I have set up w3tc on our website. I ran a test through pingdom and noticed that two large css files were being loaded. One was the w3tc minify file and the other was the theme minify file (both files contain the same code).

    Steps I’ve taken to try to resolve the problem:
    1. I tried turning minification to “manual” and adding the js and css files manually. I successfully selected all the files I wanted to add and saved the settings/purged the cache. Minification did not work at all when I tried this step instead my theme was loading it’s own files (Avada). I checked again to make sure the files were added to the js and css minification sections, once again, and made sure the enable boxes were checked and purged all caches again. Nothing changed. There was no minification at all.

    2. I use cloudflare and even though I had HTML, css, js minification enabled there, nothing was being minified. I turned those options off in cloudflare purged all caches again and there was still no minification.

    3. I turned on debug > minify and purged all caches and refreshed the page and there was nothing added to the page.

    4. I turned on auto minification, purged all caches and the files were being minified again.

    5. Unchecked “enable” box on CSS minification. However my theme css files are still being double loaded. They are loaded via a style tag in the head and via a link tag before </body>

    I need help fixing the double loading instance of the css files and fixing the manual minification issues I am experiencing.

    • This topic was modified 3 years, 10 months ago by craigmilam.
    • This topic was modified 3 years, 10 months ago by craigmilam.
    • This topic was modified 3 years, 10 months ago by craigmilam.
    • This topic was modified 3 years, 10 months ago by craigmilam.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @craigmilam

    I am sorry about the issue you are experiencing and I am happy to assist you with this!
    I’ve checked and double-checked your website and I am not seeing any issues. Is CSS minify enabled?
    Have you enabled the CSS And JavaScript Compilers in Avada Performance settings?
    Thanks!

    Thread Starter craigmilam

    (@craigmilam)

    Hi Marko,

    I just checked again. When I posted this question it was doubling all CSS files. I do have linebreaks enabled in the HTML section of the plugin but that doesn’t seem to be working. Currently I have CSS minification active and minification set to Auto. These two files are the same code – 3b850c6a355b311778146b0c11ad294c.min.css (Avada) & fbd14.css (w3tc) – I’ve turned off js compiling in Avada – CSS compiling is set to ‘file’.

    • This reply was modified 3 years, 10 months ago by craigmilam.
    • This reply was modified 3 years, 10 months ago by craigmilam.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @craigmilam

    I’ve checked your website and there is no issue with HTML minification as you can see in the page source.
    Please disable CSS Compiler in Avada Performance settings, save all, and clear Avada cache, also save ll settings and purge the cache in W3 Total Cache.
    Thanks!

    Thread Starter craigmilam

    (@craigmilam)

    Hi Marko, yes sorry I incorrectly stated that I had linebreaks enabled. I checked and that was not the case so I enabled them in the plugin.

    I’ve disabled CSS compiler in the Avada performance section, purged the Avada Cache, saved and purged cache in w3tc, and purged cloudflare cache.

    Now the css is being printed inline in the html.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @craigmilam

    Thank you for the information.

    Thread Starter craigmilam

    (@craigmilam)

    Hi Marko, thank you for the prompt support. The core issue is still not resolved. It is now including the minified css file from w3tc plus other files from avada and printing the main Avada css styles inline.

    • This reply was modified 3 years, 10 months ago by craigmilam.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @craigmilam

    I am sorry but I am not seeing this on your website. Can you please share some more information, maybe a video or some screenshot on what you are seeing because I can see the CSS file that was created by W3TC and other CSS files that are containing .min. which means that they are already minified and there fore are not minified with W3TC
    Thanks!

    Thread Starter craigmilam

    (@craigmilam)

    Ok I’ve disabled line break removal for css. If you check the page now, you will see the avada css printed inline (it was printed inline but was difficult to see). Let me know if you can see it now. So now w3tc is serving the minified css file and avada is printing that css inline in the body of the HTML.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @craigmilam

    Thank you for the information.
    As you know CSS is valid in HTML also. So this is how Avada works in this case. W3TC minified all available assets, and the fact that Avada has CSS in the HTML is not related to minifying CSS. this is HTML so you can use HTML minify and the mentioned line break removal.
    Thanks!

    Thread Starter craigmilam

    (@craigmilam)

    Hi Marko, i an aware that this is valid Mark up. The issue is, the css being printed by Avada is the exact same css as that which is in the minify file… meaning I’m downloading the css rules twice. This is a problem bc there’s 100+kb of css in both the minify file and the Avada css (since they are the exact same).

    I want to only use the css file from w3tc and not the css from Avada. With the js files w3tc replaces the Avada js files. In my case w3tc is creating the css minify file and not replacing the Avada file (or inline css as it is now).

    • This reply was modified 3 years, 10 months ago by craigmilam.
    Thread Starter craigmilam

    (@craigmilam)

    Hi Marko, just wanted to thank you again for trying to help me out here.

    I went ahead and just disabled CSS minification in w3tc as it was creating minified CSS files that Avada was continuing to serve anyway and adding bloat.

    I tried manually combining the CSS files but it did not stop Avada from serving their theme files.

    Manually combining js files did help me reduce server requests and helped my Google page speed go up by 15 points on desktop, so that is a positive.

    In the future I’d love to know if there is a way to stop Avada from serving their CSS files and only use w3tc for CSS file minification/combination. Thanks again for you help!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Minification issues: theme & minify css file both loaded’ is closed to new replies.