• Resolved cag8f

    (@cag8f)


    Hello. In a previous ticket it was determined that your plugin is active on only one of my pages–my Buyer’s Guide page. The plugin is not used on my home page. But on my home page, your plugin loads 17 JS files and 20 CSS files (screenshot). Is there any way to instruct your plugin to load only the JS/CSS files needed by the page?

    Thanks.

    • This topic was modified 5 years, 7 months ago by cag8f.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author livemesh

    (@livemesh)

    You can eliminate most of the scripts and styles by deactivating unused elements in WPBakery Addons->Settings->Elements tab as seen in the screenshot below –

    View post on imgur.com

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Side note @cag8f There are no tickets here and @livemesh isn’t a company here. Just another volunteer.

    Please do not mistake volunteer support for a company and a ticket system. That’s not these forums.

    Plugin Author livemesh

    (@livemesh)

    Thanks @jdembowski for the clarification.

    Thread Starter cag8f

    (@cag8f)

    @jdembowski

    >> Side note @cag8f There are no tickets here and @livemesh isn’t a company here. Just another volunteer.

    But @livemesh has the “Plugin Author” designation. So in my book, I don’t classify him as “just another volunteer.” I am more inclined to trust his replies over replies from other users. So wouldn’t you agree that he is a little different in that respect, at least in the support forum for this specific plugin? Am I misunderstanding something?

    @livemesh

    >> You can eliminate most of the scripts and styles by deactivating unused elements in WPBakery Addons->Settings->Elements tab as seen in the screenshot below –

    OK that helps, but it doesn’t seem to do exactly do what I’ve asked. Namely, how can I ensure the ‘accordion’ script/style is loaded only when my ‘Buyer’s Guide’ page is loaded?

    Also, even if I deactivate all elements, the plugin still loads five files on my home page (screenshot). Is there any way to prevent that?

    Thanks.

    • This reply was modified 5 years, 7 months ago by cag8f.
    Plugin Author livemesh

    (@livemesh)

    @cag8f The feature that enables accordion styles only on the specific page where the widget is used should ideally be part of the page builder. Unfortunately, WPBakery Page Builder is not designed that way unlike some others like Beaver Builder or SiteOrigin.

    I will work on removing the rest of the files in upcoming update. They are mostly styles and scripts which are needed for majority of addons (if not all) and hence they were retained as common files across all addons. Hope that makes sense.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    So wouldn’t you agree that he is a little different in that respect, at least in the support forum for this specific plugin? Am I misunderstanding something?

    You are misunderstanding something but it’s not that much of a big deal. I was referring to the idea that the author’s volunteer time and support is a “ticket” here. That’s not the case.

    Plugin and theme author’s are owed a thank you for their time, contribution and support. But that’s it. Sadly, too often people believe (erroneously) that the “Plugin Author” designation means

    1. The user is a “customer” (they are not and never have been) so the author somehow owes them a reply.
    2. Have some sort of ethical obligation to reply and support the code (that was the other day but it happens too often).
    3. Will get a bad review about not being a good company (see comment about volunteers a few posts up).

    *Drinks badly needed coffee*

    You get the idea. ?? You are correct that authors generally do know their own code better than anyone else. What I was referring to was just making sure that your expectations were set correctly and that you do not mistake that you are owed something from the author. You’re not.

    Thread Starter cag8f

    (@cag8f)

    @livemesh

    >> The feature that enables accordion styles only on the specific page where the widget is used should ideally be part of the page builder. Unfortunately, WPBakery Page Builder is not designed that way unlike some others like Beaver Builder or SiteOrigin.

    OK. But could I perhaps accomplish this with custom PHP code in my child theme? For example, in my child theme’s functions.php, can I dequeue the accordion script/style on all pages *except* for my Buyer’s Guide page? Wouldn’t that ensure the accordion script and style are loaded only on my Buyer’s Guide page? Would you see any issue with that?

    >> I will work on removing the rest of the files in upcoming update. They are mostly styles and scripts which are needed for majority of addons (if not all) and hence they were retained as common files across all addons. Hope that makes sense.

    OK. Do you a general timetable as to when these updates might be released? If it is a long time, I may try to implement a temporary solution with custom code. The temporary solution would be along the same lines as what I described above–adding custom PHP to prevent the loading of these 5 files on my home page. Again, would you see any issue with that?

    @jdembowski OK I understand all that.

    Plugin Author livemesh

    (@livemesh)

    1) Dequeuing the accordion styles and enqueuing the same by checking the page id would work. I see no issues.

    2) I hope to get the update out by the end of this week. Meanwhile, you can dequeue these styles and scripts and have them loaded only on the specific page where you need the accordions. Should be similar code if you have done the 1 above. Again, I see no issues if you do the same.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to prevent unnecessary JS/CSS files from loading?’ is closed to new replies.