Google is actually very unhelpful here, as soon as PageSpeed detects Render blocking JS it gets cross and lowers your score - but here's the rub...
Sometimes you genuinely need render blocking JS.
Umbraco Forms is the perfect example. What happens if you render the form without the JS? It doesn't work.
Should we be serving content that doesn't work to a user? No.
So in this case the easiest solution is to load the JS first and block the rendering until it is ready to go - yes it's slightly slower, but the overall user experience is better.
--- end rant ---
The short answer to your question is no. Umbraco Forms, needs jQuery before it renders.
See new answer below.
You could implement your own form, using surface controllers, and then you would be in complete control of the JS and rendering.
I think that forms should work without js, it supported by native html, I think that the problem is with validation and ajax sending, but all this code can be placed at the bottom of the page.
I had the same problems all the time when we have Umbraco Form on the home page of the site, and this is pretty annoying, and there is no perfect solution - we need to change Umbraco Forms or Google :)
Prioritize javascript loadorder
Hey guys,
I'm trying to get rid of the
From Google PageSpeed. I have moved most of my Javascript in the bottom of the site but doing that makes plugins like UmbracoForm throw an error:
Is it possible to force UmbracoForm to load AFTER my jQuery in the bottom of the page?
OK, this part of PageSpeed really annoys me
-- begin rant ---
Google is actually very unhelpful here, as soon as PageSpeed detects Render blocking JS it gets cross and lowers your score - but here's the rub...
Sometimes you genuinely need render blocking JS.
Umbraco Forms is the perfect example. What happens if you render the form without the JS? It doesn't work.
Should we be serving content that doesn't work to a user? No.
So in this case the easiest solution is to load the JS first and block the rendering until it is ready to go - yes it's slightly slower, but the overall user experience is better.
--- end rant ---
The short answer to your question is no. Umbraco Forms, needs jQuery before it renders.See new answer below.
You could implement your own form, using surface controllers, and then you would be in complete control of the JS and rendering.
Hi Mike and Jason
I think that forms should work without js, it supported by native html, I think that the problem is with validation and ajax sending, but all this code can be placed at the bottom of the page.
I had the same problems all the time when we have Umbraco Form on the home page of the site, and this is pretty annoying, and there is no perfect solution - we need to change Umbraco Forms or Google :)
Thanks,
Alex
Hi Alex,
In newer versions of Umbraco forms if jQuery and Unobtrsuive Validation aren't detected, a big red error message is dispayed in the page.
Jas
Hi Mike,
It can be done, and relatively easily!
I've just had to implement the solution below in a new site and it works a treat.
https://our.umbraco.org/documentation/products/umbracoforms/developer/rendering-scripts/
Really not sure how I didn't find this last time I looked!
Hi Jas
Thank you very much for your finding! It works great.
/Alex
is working on a reply...