Title: [Plugin: Simple Twitter Connect] JavaScript Loading on Every Page
Last modified: August 20, 2016

---

# [Plugin: Simple Twitter Connect] JavaScript Loading on Every Page

 *  Resolved [Ryan](https://wordpress.org/support/users/rfrankel/)
 * (@rfrankel)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-twitter-connect-javascript-loading-on-every-page/)
 * Otto,
    A quick question…it seems that with STC activated the JavaScript is loaded
   on every page of the site instead of only the pages that utilize a STC sub-module.
   Is that the case or am I missing a setting somewhere?
 * [http://wordpress.org/extend/plugins/simple-twitter-connect/](http://wordpress.org/extend/plugins/simple-twitter-connect/)

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

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-twitter-connect-javascript-loading-on-every-page/#post-3036462)
 * Yes, that is indeed the case, and it’s by design. Browsers do this pretty intelligent
   thing called “caching”, where they save the information from one page to the 
   next. So it really doesn’t matter much if all the pages have the twitter javascript
   code, the code will be loaded from the browser cache.
 * More to the point, the twitter code is linked directly to the twitter servers,
   so it’s loading from them, same as it loads for every other website on the internet
   that has the twitter code on it. So there’s a fairly good chance that the users
   browser already has the twitter javascript in its cache to start with.
 * Not the initial loading shiv, mind you, which is different for every site, but
   the subsequent lazy-loaded code will be much the same and have the same URLs.
   Same thing happens with Facebook’s JS, it loads a short JS file which then loads
   like 10 others, all of which are basically the same from site to site.
 * This is why single-page-testing tools and things like YSlow and such don’t tell
   the whole story. They’re only measuring the performance of one particular page
   load, you really have to see it from a whole-site standpoint.
 *  Thread Starter [Ryan](https://wordpress.org/support/users/rfrankel/)
 * (@rfrankel)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-twitter-connect-javascript-loading-on-every-page/#post-3036489)
 * That is one great answer and that makes perfect sense. It would be interesting
   to see some analytics on how many people really do have it pre-cached before 
   they get to our site. As an aside do you know of any way to detect if a cached
   version is being used (Client side JS library maybe)?

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

The topic ‘[Plugin: Simple Twitter Connect] JavaScript Loading on Every Page’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-twitter-connect_9bcade.svg)
 * [Simple Twitter Connect](https://wordpress.org/plugins/simple-twitter-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-twitter-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-twitter-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-twitter-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-twitter-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-twitter-connect/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ryan](https://wordpress.org/support/users/rfrankel/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-twitter-connect-javascript-loading-on-every-page/#post-3036489)
 * Status: resolved