• Resolved julie

    (@juregan)


    Hi,

    I am trying to improve my site speed performance and having issues with javascript render blocking resources.

    The page speeds (with Autoptimize CriticalCSS.com power up enabled) were between 48 and 52.

    The biggest render issue was javascript Render Blocking Resources. I added the files identified by PageSpeedInsights to the Extra/Async javascript files option.

    The result was that the page speeds increased to between 58 and 60 but the Contact form did not render at all. There are Uncaught reference errors jQuery not defined in the console.

    For the moment, I have removed the Async javascript files so that the Contact form will be displayed.

    Another issue is that the html renders first in the Contact form and after a few seconds, the CSS renders. Prior to loadiing Autoptimize, there were no rendering issues with the contact form.

    If I enable the Lazy load images option, the contact form does not render.

    I have been testing on Chrome, Firefox and Edge.

    Would really appreciate some help with this.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Given the fact your GPSI score was great when asyncing your JS and all pages worked great except for contact, the easiest way forward towards great performance would be to simply disable AO on /contact/ with this code snippet;

    add_filter('autoptimize_filter_noptimize','brennan_noptimize',10,0);
    function brennan_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'contact')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    hope this helps,
    frank

    Thread Starter julie

    (@juregan)

    Hello Frank,

    Thank you for your really quick response. It was really helpful.

    I added the snippet to functions.php, added the render-blocking js files back into to ‘Extra/Async JavaScript code’, enabled Lazy-load images and everything works as expected.

    The GPSI page scores are all at between 52 and 61. The exception is the Contact page which has a low GPSI but the html and css renders at the same time so that is a big improvement.

    Much appreciated.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Glad to be of help Jude, feel free to leave a review of plugin & support here 🙂

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

The topic ‘Autoptimize CriticalCSS.com Power up issues javascript render blocking resources’ is closed to new replies.