Skip Navigation

[Resolved] Deferring javascript breaks site: which script do I exclude from deferral

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by chrisL-13 3 years, 7 months ago.

Assisted by: Waqar.

Author
Posts
#2062127
Screen Shot 2021-05-19 at 5.04.37 PM.png
Screen Shot 2021-05-19 at 5.03.53 PM.png

>>Tell us what you are trying to do?
Improve performance of the client's website using Perfmatters plugin to defer javascript

Is there any documentation that you are following?
hidden link

Is there a similar example that we can see?

What is the link to your site?
hidden link

This is the development version of this client site (which recently launched — thank you for all the support).

They want to speed it up. I am testing out Perfmatters, a kind of all-in-one utility that allows me to boost page load times by (among other things) deferring javascripts until the end of the page load. Great idea.

But when I turn it on, all of the views used on the site's home page (basically the entire site) render without any of their layouts.

So Perfmatters lets me exclude javascripts from being deferred.

Which toolset scripts need to load in the head of the home page document?

#2062679

Hi,

Thank you for contacting us and I'd be happy to assist.

I've performed some tests and noticed that Toolset Blocks seems to load only this file at the head of the page:
/wp-content/plugins/toolset-blocks/vendor/toolset/common-es/public/toolset-common-es-frontend.js

The rest of the script files are already loaded at the page's end, so you can exclude this file and then test the page again.

I hope this helps and please let me know how it goes.

regards,
Waqar

#2063073

That did it.

I added '/wp-content/plugins/toolset-blocks/vendor/toolset/common-es/public/toolset-common-es-frontend.js' to the list of exceptions in the Perfmatters plugin config. When I turned on the 'Defer javascript' option, my site rendered normally.