• Resolved gradyjenkinz

    (@gradyjenkinz)


    On Google Pagespeed test I’m getting the alert to eliminate render-blocking javascript, and the only file is autoptimize_f23337496dc878d52bfe59da6278eddc.js. Is there any way I could fix this?

Viewing 15 replies - 1 through 15 (of 17 total)
  • sure; have a look at the settings-page and at AO’s FAQ, at which point I’m sure you’ll understand that unchecking “force JS into head” is your go-to option (you might have to do some more tweaking to ensure everything works, maybe even “aggregate inline JS”) πŸ˜‰

    have fun!
    frank (ao dev)

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Frank,
    Thanks for the quick reply first of all, great plugin. I tried unchecking the force JS into head option which get rid of the render blocking file, but it breaks my site.

    dev.shoredigitalsolutions.com is my website incase you were wondering.

    it is entirely possible some of the JS you’re autoptimizing needs to be forced into head, hence this is the default setting. if you do want to defer the JS, you can keep on doing so, but you’ll have to identify the JS the desperately wants to be loaded early and exclude that from optimization. again, the FAQ explains how to troubleshoot such issues.

    frank

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Frank,
    Another issue I ran into is Autoptimize causing the server response time to go from .36 seconds to .57 seconds on google pagespeed. Do you know of any reason why this happened?

    if you’re not using a page cache, autoptimize gets triggered on every request and that will always cause some slowdown. google pagespeed insights, mind you, is not a tool to accurately monitor response time but “just” a best practices checker.

    if you want to do real performance tetsing, you should switch to webpagetest.org and run tests with multiple iterations and compare median results for things such as “time to first byte”, “time to start render”, “document loaded” and “fully loaded” πŸ™‚

    but I see you’re doing both page caching & minification with W3TC now?

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Yeah, I just installed it about 15 minutes ago. It made it faster but broke some things on the site. Thanks for all the help by the way, I’m just an intern trying to fix the company’s site.. πŸ™‚

    well, in that case use W3TC for the page caching functionality, disable all minification in W3TC and re-enable autoptimize and all will be well πŸ™‚

    not too shabby, for an intern πŸ˜‰

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Yeah I did that and it seems to work better now, but after it is cached the parallax and the section video stop working. Thanks, I’m trying my best lol

    the parallax and the section video stop working

    ok, have a look at your browser’s error console. chances are something comes up like “jQuery not defined”, in which case you’ll have to add js/jquery/jquery.js to the JS optimization exclusion list.

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Frank I’m really sorry for all these questions, but I tried that and it didn’t work. The only Jquery errors were from autoptimize and it said they were deprecated.
    jQuery.event.handle is undocumented and deprecated
    Jquery.browser is deprecated
    jQuery.fn.load() is deprecated

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Nevermind, I don’t think its a plugin issue. I’m getting PHP errors in the error log.

    jQuery.event.handle is undocumented and deprecated
    Jquery.browser is deprecated
    jQuery.fn.load() is deprecated

    those are warnings about deprecated jquery functions being used, you’ll see the exact same ones without autoptimize active (you can easily check that by adding ?ao_noptimize=1 to the URL, which disables AO for that request).

    Nevermind, I don’t think its a plugin issue. I’m getting PHP errors in the error log.

    not from autoptimize, I hope?

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    I don’t think so, it was working yesterday when I left, and I came in today and I’m getting PHP Notice: Undefined variable: post in /functions.php message in my error_log

    ah, but a notice is just that, a notice. it’s not an error and as such it cannot explain the problem you described. so back to square one, I’m afraid.

    Thread Starter gradyjenkinz

    (@gradyjenkinz)

    Oh I gotcha.
    PHP Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50547 Library:50630
    This warning also appeared in the error log, you think that has something to do with it?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Autoptimize only render-blocking javascript file’ is closed to new replies.