Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter paulmartinsen

    (@paulmartinsen)

    For anyone else seeing this ‘problem’:

    It turned out that the server we are using is configured not to compress files greater than 1 MB and the developer tool I was using was only reporting the transferred size and not the content size.

    The theme we are using has quite a large CSS file. So when AO joined them all together, we went over the 1MB limit and see a large file transferred. When AO is disabled, each CSS file gets transferred with compression so it looks smaller overall.

    Frank was super helpful figuring this out. The solutions he proposed:
    * best: tweak litespeed config to also compress the AO’ed CSS-file
    * alternative: tweak litespeed config to allow PHP in wp-content/cache/autoptimize/* being executed and then disable the AO option to serve the files statically.

    I’ll investigate these.

    Thanks Frank for all your help. AO is awesome!
    Paul.

    Thread Starter paulmartinsen

    (@paulmartinsen)

    A puzzle wrapped up in an enigma!

    I’m travelling for the next couple of days. When I get back I’ll setup an account so you can access our test site. Would you mind contacting me using paul at megunolink.com so I can send you the login credentials?

    I’ll see if I can raise a ticket with Artbees too.

    Thanks for your help,
    Paul.

    Thread Starter paulmartinsen

    (@paulmartinsen)

    Hi Frank,

    It is indeed strange!

    I removed the CSS exclude filters and confirmed we were back to 1.2MB for AO’s css file.

    * I switched to the Twenty Seventeen theme. AO’s css file is a sensible 117 kB
    * Crayon Syntax Highlighter plugin was active, I deactivated it and AO’s css file dropped to 101kB. Interestingly, if I active the syntax highlighter and turn off AO’s CSS optimization the crayon.min.css file is only 3.8 KB, less than the difference in AO’s css file. I suspect AO is including more css files from the syntax highlighter.
    * I turned Jupiter back on, confirmed we were back to the big css file from AO then turned off all the plugins that weren’t needed for Jupiter. That left: WPBakery Page Builder, Really Simple SSL, Artbees Themes Captcha and Autoptimize. AO’s css was 1.1MB.
    * Jupiter has speed optimization to minify theme styles files. Turning that off made no difference to the size of AO’s css file. It also has something called “global lazy load”, but turning that off didn’t make a difference either.
    * Crayon Syntax Highlighter has an option “Enqueue themes in the header” which sounds like it does something with css. turning that off dropped AO’s css file from 691k to 101k with the Twenty Seventeen theme. Though not consistently; it was a bit confusing.

    So the Jupiter theme really does seem to be at the root of the problem here. I’ve put the site back to Jupiter so it it is making the large files. I left the css for convertplug excluded because that seems to attach per user tags to the css so the AO keeps creating lots of new CSS files, as explained in one of your FAQs.

    Hope that helps,
    Kind regards
    Paul.

    Thread Starter paulmartinsen

    (@paulmartinsen)

    Hi Frank,

    Wow, I didn’t expect such a fast reply. Thanks!

    I’ve been exploring a little more and toggling AO on and off (I thought there was a query string parameter I could use to do this but I can’t find it again).

    I made some progress.

    We use the code crayon plugin to format code. I found its CSS in the home page’s AO.css file, even though no code is on that page and the CSS wasn’t referenced when AO is off. I found a comment on the authors blog that makes me wonder if they are adding the CSS file to a list then pulling it out again if the plugin isn’t used.
    http://aramk.com/blog/2012/01/07/enqueuing-themes-and-fonts-in-crayon/

    We’re also using the Jupiter theme by artbees. With AO off, the page references:
    full-styles.6.1.1.css. This is in a folder with a bunch of other css files. It looks like AO is automatically including them (based on the content of AO’s css file). This is the main thing that is blowing out the file size.

    When I exclude:
    wp-content/plugins/crayon-syntax-highlighter/themes/classic,
    wp-content/themes/jupiter/assets/stylesheet

    AO’s css file returns to a much more manageable 17.7 kb.

    The downside is that this leaves a separate request for the other stylesheets that block for a bit (because of number of parallel content requests by the browser).

    So I was wondering if there is a way to tell AO to exclude a folder, but include a specific css file from it? It would be great if there was an extra parameter in the config section where we could give it a specific file to include. I guess that might be more complex than it sounds since I believe order matters for css.

    Any idea why AO would be grabbing all these extra CSS files? If there is anything I can do/send you to help solve that one, please don’t hesitate to ask. I’m happy to provide access to our test site if that would be useful.

    I’ve turned AO back on again, though it has those exclusions now.

    This really is a nice plugin. Thanks for all your hard work on it.
    Kind regards
    Paul.

Viewing 4 replies - 1 through 4 (of 4 total)