Skip Navigation

[Resolved] I would like to disable unnecessarily loaded styles and scripts.

This support ticket is created 2 years, 4 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 1 reply, has 2 voices.

Last updated by Waqar 2 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2251859

Tell us what you are trying to do?
I would like to disable unnecessarily loaded styles and scripts. I would prefer to be able to include the scripts and styles as an Astra hook where I need them. OR simply linked to pages/views.

Is there any documentation that you are following?
Read all the posts. Much of it no longer works! In general, you just have to say that the performance of toolset is not good.

Contributions that are clear but do not solve my problem...
https://toolset.com/forums/topic/how-can-i-disable-unnecessary-code-that-the-toolset-inserts-without-my-permissio/
https://toolset.com/forums/topic/remove-unnecessary-scripts-views-version-1-5/
...

A contribution that would actually be my solution but also does not work.
https://toolset.com/forums/topic/cruft-output-by-views/#post-610342
i have chnage the id from the view but not happened...

I would like to disable styles and scripts on the entire site. I can get that to work as well. The loading at the necessary places I just do not get.

Is there a similar example that we can see?
Here is an example where only one HTML-Element is output. Nevertheless all scripts and styles are loaded. This is simply bad.
I use the view here only to build the query....
hidden link

Here the loading of the styles and scripts is necessary and correct. This is an archive. So it would be enough for me if I can say, please load to the archive XY the scripts and styles... Otherwise NOT.
hidden link

What is the link to your site?
hidden link

#2252021

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

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

Can you please check out the recommendations I followed in this other ticket:
https://toolset.com/forums/topic/is-codemirror-really-needed-in-front-end/

Disabling the built-in styles and scripts is not recommended because it can result in unexpected results and broken functionalities, but for someone who understands the risks involved, the code snippet examples from that ticket still work.
( I've just tested them now on my test website )

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.