• Hey Gabe,

    I sent you a couple emails last week (with logs attached), but figured I’d reach out to you here as well.

    On the site I’m working on, the homepage loads a completely blank screen if I minify HTML (either through WP Rocket or Autoptimize) and have Asset Cleanup enabled.

    If I deactivate Asset Cleanup, or turn off minify HTML, it all works as normal. However, even just having AC activated with no rules causes the blank page on the homepage. I tried completely resetting the plugin as well.

    I’m stumped as to why this could be happening. I’ve cleared cache, deleted/reinstalled the plugin etc.

    Their weird thing is that every other page works fine.

    Let me know if you have any ideas or questions.

    Thanks!
    Sunny

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @sunnyt13 In all my tests, IF you have a very large HTML output (e.g. lots of inlined CSS/JS), then minify HTML function from Autoptimize will return a blank page because there is too much to process.

    Whenever I reduced the page’s size, it worked fine. This happens whether Asset CleanUp is enabled or not. Can you try increasing the memory limit that you have in your hosting account and see if that fixes it. Anyway, it doesn’t matter which solution you use for minifying HTML, this kind of feature is strongly recommended to be used together with a caching service (e.g. a plugin such as WP Rocket or a server-side solution such as the one your hosting could be offering). If the HTML output is minified every couple of hours and you have lots of traffic and lots of pages on your website, then not having any caching could lead to a huge increase in CPU/memory load that could sometimes crash the website.

    Their weird thing is that every other page works fine.

    Please check the HTML source of the homepage when its HTML source is not minified. Perhaps it has more elements and is considerably larger in KB then other pages which often are smaller. For instance, “Contact” or “Terms” pages are often much smaller.

    I’ll check all your emails you mentioned in case I might have missed any.

    Thread Starter sunnyt13

    (@sunnyt13)

    Hey Gabe,

    Thanks for the reply and the suggestion. Going to run a few more tests today, but minifying HTML worked without any issue if Asset Cleanup was disabled. It was only when minifying + Asset Cleanup plugin activated that it returned the blank page.

    I think you are on the right trail though, because the page has a section that dynamically loads a bunch of SVGs, so there are quite a few DOM elements.

    Plugin Author Gabe Livan

    (@gabelivan)

    @sunnyt13 There’s a chance the running of Asset CleanUp (depending on its settings) is adding up to the total usage of CPU/memory, thus resulting in this problem. I’ll check your emails, do more tests and hopefully, we can get to the bottom of this. It might be one Aset CleanUp function that is interfering with the minification of the HTML. Now, are you getting this problem only when you are logged-in or also in Incognito view (when you’re not logged-in)?

    Thread Starter sunnyt13

    (@sunnyt13)

    Hey Gabe,

    I tried bumping the memory up to 512M, but I still get the white page.

    It only happens in incognito where WP Rocket does its caching and minifying.

    I’m going to see if we reduce the number of svg logos that are preloaded and see if that helps. It most likely will, as the only other thing that gets the page to load besides disabling Asset Cleanup is disabling the logos.

    Let me know if you’d still like to explore if there’s a function that’s interfering, as Asset Cleanup is one of my favourite plugins and I’m always happy to help ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blank homepage when minifying HTML’ is closed to new replies.