Home Forums Plugin Support WP User Frontend Pro Scripts Loading

This topic is: resolved

Tagged: 

This topic contains 7 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14550

    Jamie
    Member
    Post count: 32

    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.

    #14551

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #14573

    Jamie
    Member
    Post count: 32

    Hello,

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

    Anything else I can look into ?

    cheers,

    #14574

    Tareq Hasan
    Keymaster
    Post count: 2831

    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?

    #14575

    Jamie
    Member
    Post count: 32

    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.

    #14577

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #14578

    Jamie
    Member
    Post count: 32

    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?

    #14581

    Tareq Hasan
    Keymaster
    Post count: 2831

    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 8 posts - 1 through 8 (of 8 total)

The topic ‘Scripts Loading’ is closed to new replies.