• Resolved gstarter

    (@gstarter)


    Hi Frank,
    Thank you for a great plugin, it is awesome!
    I’m using it on all my sites, but have a small problem I’d like to raise and maybe you can direct me (I’m not asking you to solve it for me …)
    In the following sites – http://www.spectoos.com and http://www.loopindex.com
    When the pages start to load, the page freeze with a bad styling and after a second or two all components get to their styled position.
    What is the problem and where should I start looking?

    Thanks,
    Guy.

    https://ww.wp.xz.cn/plugins/autoptimize/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Frank Goossens

    (@futtta)

    that’s probably because there’s javascript-driven rendering taking place, but your js is aggregated an loads very late (inserted at the end of the HTML with the defered-flag). try if ticking the “force JS in head”-option solves this rendering issue?

    frank

    Plugin Author Frank Goossens

    (@futtta)

    ah, on loopindex you’re “inline&defer”-ing, defered CSS loads very late as well, same issue really.

    love the black labrador on loopindex homepage by the way, had one just like that … πŸ™‚

    Thread Starter gstarter

    (@gstarter)

    Hi Frnak,
    Thanks for the quick reply, I’ll check it out and let you know.
    If I’ll use the HTML in the head, as you suggested, wouldn’t it have a bad implication on the above the fold rendering ?
    I agree, he is indeed adorable πŸ™‚

    Thanks,
    Guy.

    Plugin Author Frank Goossens

    (@futtta)

    If I’ll use the HTML in the head, as you suggested, wouldn’t it have a bad implication on the above the fold rendering ?

    yeah, it is possible (likely) that when forcing JS in head and/ or not deferring CSS, you will indeed see some increase in rendering time. it’s a matter of priorities, really.

    frank

    Thread Starter gstarter

    (@gstarter)

    Thanks Frank.
    I’ve checked the “force JS in head”-option, it didn’t solves the rendering issue πŸ™

    Plugin Author Frank Goossens

    (@futtta)

    on spectoos? I’d check, but is already back in the footer again πŸ™‚

    Thread Starter gstarter

    (@gstarter)

    No, on loopindex.com, it is set now – http://www.loopindex.com/inline-comments/

    Thanks Frank!

    Plugin Author Frank Goossens

    (@futtta)

    ah, but on loopindex you’re “inline&defering CSS”, and “the page freeze with a bad styling and after a second or two all components get to their styled position.” is due to the inlined CSS actually.

    look at the two screenshots uploaded on http://imgur.com/a/sAmlI
    one is the site fully rendered, the other one is with the main AO-CSS-file (which gets loaded later) disabled. so what you’ll see, when loading, is the one without the AO-CSS-file first and after approx. a second (well, can be more or less, depending on your bandwidth) the main AO CSS gets loaded and all is fine.

    so either add “stuff” to the inlined CSS or don’t inline&defer (or accept the temporary styling issue, off course)?

    frank

    Thread Starter gstarter

    (@gstarter)

    So if I understand correctly it is not because of the js, but because of the “Inline “above the fold CSS” which lacks some of the styling, correct?

    I tried to find the lacking css part (used several critical path css tools), but none solved the problem.
    Is there another way to know which part is missing?

    Thanks,
    Guy.

    Plugin Author Frank Goossens

    (@futtta)

    Is there another way to know which part is missing?

    manually inspecting node style properties in your browser’s development tools and adding the missing styles to your above-the-fold CSS. not the easiest thing though (except if you’re kick-ass CSS wizard, off course)

    frank

    Plugin Author Frank Goossens

    (@futtta)

    hmm .. I tried with criticalcss.com, the above-the-fold CSS is not perfect, but it’s better then what you have now.

    Thread Starter gstarter

    (@gstarter)

    Yep, I tried the same, but doesn’t look better πŸ™
    It is live now with the css generated by criticalcss.com

    Any other way to track the right css that you know?

    Plugin Author Frank Goossens

    (@futtta)

    Any other way to track the right css that you know?

    well, you could give this bookmarklet a spin?

    Plugin Author Frank Goossens

    (@futtta)

    this one seems better for /inline-comments/, no?

    frank

    Thread Starter gstarter

    (@gstarter)

    Thanks Frank.
    Yes it is, BUT I’m looking for the way to do it right (not you or someone else to do it for me) AND it is not 100%, there are still parts that get in their position in delay.

    Two problems:
    1. I’m kind of perfectionist
    2. I would like to master it, so I can apply it to all my current sites and future sites.

    Any advice?

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Page load issue’ is closed to new replies.