Up to 50 percent off

Scripts Loading

This topic contains 7 reply and 2 voices, and was last updated by Tareq Hasan 10 years, 10 months ago
Viewing 7 Posts - 1 through 7 (of 7 total)
Author Posts
January 18, 2014 at 12:48 pm 14550
Tareq Hasan Hello, I've noticed that the wpuf scripts are being loaded on every page. Is there any way that I can stop this? I have a very complex site and I'm trying to reduce my load times. thanks.
January 18, 2014 at 3:12 pm 14551
Tareq Hasan Tareq Hasan

There is a setting in the plugin by which you can turn off the script loading in all pages. It’ll just load the scripts where WPUF shortcodes are there.

January 19, 2014 at 6:49 am 14573
Jamie Jamie

Hello,

I have disabled this setting and they are still loading on all pages.

Anything else I can look into ?

cheers,

January 19, 2014 at 12:46 pm 14574
Tareq Hasan Tareq Hasan

That shouldn’t be, are you sure it’s still loading all of pages?

Which site are you using the plugin? Can you post the url?

January 19, 2014 at 12:50 pm 14575
Jamie Jamie

My server is currently being upgrade so I can’t link you to the site just yet. I will once its back online. I tested with my front page which doesn’t have any frontend-forms loaded and it is still loading all the js and css and I’m not using google maps stuff ANYWHERE and that is loading on every page also.

January 19, 2014 at 12:53 pm 14577
Tareq Hasan Tareq Hasan

Google maps, frontend-forms.css and frontend-form.js will load in all pages, others are not.

Google map is needed because if you turn on the show custom field option and if you have map in a field, google map script needs to be loaded too. Thats why it’s being loaded in all pages.

January 19, 2014 at 12:56 pm 14578
Jamie Jamie

Ok, well that’s the scripts that are loading everywhere. Why do they need to load on every page? Is it possible to disable these and only have them enabled on pages I want?

I guess I could wp_dequeue the scripts and do is_page(‘someformpage’) no?

January 19, 2014 at 1:13 pm 14581
Tareq Hasan Tareq Hasan

Yes you could do that, but I wouldn’t suggest to do so. Browser will cache those scripts in the initial page load anyway and the scripts/styles are not huge. Checking on every pageload by is_page also a overkill.

Viewing 7 Posts - 1 through 7 (of 7 total)