[Plugin: Contact Form 7] Jquery js files on every page = unneceassary load on server (6 posts)

  1. rxsc
    Posted 7 years ago #


    Your plugin is great, i spent hours customizing it, making forms and such.

    However, after looking at the headers, it seems it loads Jquery.js, jquery.form.js, and even contact-form-7.js on every page.

    For a big site that is 65 kbish of extra load for no reason except for 2 pages on my site where users will rarely go.

    I know this is a minor thing but is there a way i can custom code those .js files to appear on only my 2 wordpress pages?

    Unless this is default in wordpress............. then i totally messed up here.


  2. Takayuki Miyoshi
    Posted 7 years ago #

    @rxsc currently there is no way but I have a plan to make it. In a few months maybe.

  3. rxsc
    Posted 7 years ago #

    Few months to move a bunch of code? i guess i can wait....

  4. SuperMAG
    Posted 7 years ago #

    thats the problem with alot of plugins, i just dont know why. i mean almost 10 plugins.

    Temporary Solution:

    For Example:
    so i removed the hook. that insert js and css files to wp head.

    its like add_action('wp_head', 'quoteScripts');
    from the plugin and inserted the code like:

    <script src="http://wrestlingfans.co.cc/wp-content/plugins/comment-form-quicktags/quicktags.js" type="text/javascript"></script><link rel="stylesheet" href="http://wrestlingfans.co.cc/wp-content/plugins/comment-form-quicktags/style.css" type="text/css" media="screen" />

    to the page thats needs that plugin like your contact form.

  5. holteas
    Posted 6 years ago #

    Is there any update on this? It's working fine on my site, but I'd like to clean up the header a bit and loading jquery on every page is a waste.

  6. Takayuki Miyoshi
    Posted 6 years ago #

    Yes. You can use WPCF7_LOAD_JS constant for it.


Topic Closed

This topic has been closed to new replies.

About this Topic