WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
REQUEST: Load JS only when needed! (6 posts)

  1. Bughunter
    Member
    Posted 1 year ago #

    Hi, your plugin slows down websites with loading javascript stuff on every page request - please read

    http://scribu.net/wordpress/conditional-script-loading-revisited.html

    and modifiy your plugin to load its js stuff only when needed.

    This would make it possible to use your plugin even on professional websites, not only private homepages.

    THANK YOU VERY MUCH!!!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. biswajeet
    Member
    Posted 1 year ago #

    Hi Bughunter, I don't think CF7 js is responsible for slow down site. I have used it on several sites without any problem. There might be some problem with your hosting server, consider a check with them!

    CF7 js is indeed a small file and wouldn't hurt loading on every pages. There are several advantages of this particularly since we can load any cf7 form via Ajax which we most professional developer like...

    Also, you might consider optimizing your public interfaces with techniques like - caching, compression etc...

    Hopes this will clear you.

  3. ilovegames
    Member
    Posted 1 year ago #

    Well it may is not a heavy file but it would be great if I could say to your plugin that it shoul only load when needed because it crashes my js-slider on the frontpage.

    Don't you have any ideas for us to disable the js-loading for pages where it's not needed?

  4. biswajeet
    Member
    Posted 1 year ago #

    @ilovegames can you point me to your site url and additionally like to know what is the "js-slider" plugin you have conflict with CF7 js?

  5. epipe-com
    Member
    Posted 1 year ago #

    I agree with the previous requesters.

    There is no need to load additional CSS and JS on every page. It would be appropriate to load them only when needed (when there is a form on the page).

    A site may have hundreds of pages but a contact form only on a single page!

  6. ilovegames
    Member
    Posted 1 year ago #

    Hi biswajeet,

    I'm sorry but I've solved the problem, so I can't show you the conflict.

    This post helped me out:
    http://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic