Title: Only include javascript on one page?
Last modified: August 30, 2016

---

# Only include javascript on one page?

 *  Resolved [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/only-include-javascript-on-one-page/)
 * Hello,
    I found a problem. If I let the JavaScript be on every page, then the
   chat messages basically arrive instantly. However, if I only specify the JavaScript
   on my chat page which is [http://yourtechadvisors.com/chat](http://yourtechadvisors.com/chat)
   then the sound does not work and it takes a page load to submit it. Is there 
   anyway I can include the JavaScript on my chat page and in the submit function
   so the page doesn’t have to reload? A lot of potential here, keep up the good
   work.
 * Thanks.
 * [https://wordpress.org/plugins/simple-ajax-chat/](https://wordpress.org/plugins/simple-ajax-chat/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/only-include-javascript-on-one-page/#post-6684164)
 * It sounds like something is interfering with normal functionality. Most likely
   it is due to either how/when the script is included on the page, or perhaps there
   is a conflict with another script somewhere. I recommend troubleshooting to diagnose
   the issue.
 *  Thread Starter [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/only-include-javascript-on-one-page/#post-6684165)
 * Yes could be. But it is funny, it works fine when I allow the scripts on all 
   pages, it is just when i restrict the script to my chat page is when the problems
   start. I run a very optimized website, and did not want the extra load time.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/only-include-javascript-on-one-page/#post-6684270)
 * Understood. If you discover any further clues don’t hesitate to follow-up. If
   there is anything that I can do from this end please let me know, thanks.
 *  Thread Starter [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/only-include-javascript-on-one-page/#post-6684271)
 * OK thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Only include javascript on one page?’ is closed to new replies.

 * ![](https://ps.w.org/simple-ajax-chat/assets/icon-256x256.png?rev=1473439)
 * [Simple Ajax Chat – Add a Fast, Secure Chat Box](https://wordpress.org/plugins/simple-ajax-chat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-ajax-chat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-ajax-chat/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-ajax-chat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-ajax-chat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [message](https://wordpress.org/support/topic-tag/message/)

 * 4 replies
 * 2 participants
 * Last reply from: [tech55541](https://wordpress.org/support/users/tech55541/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/only-include-javascript-on-one-page/#post-6684271)
 * Status: resolved