I just updated my site to load certain files only when necessary. For
instance, I only load the FCFEditor when I have a textarea that is
going to use it, and I just have the script element directly after the
textarea.
As for performance, its going to depend. However, I moved about 3-4
plugins to being loaded "on demand" (instead of on every page) and I
shaved 3-4 seconds of load time off my homepage (to be fair I also did
a few other performance tweaks that helped as well)! Also, definitely
read the link aquaone sent as well.
Here is the pseudocode that I use for including my extra plugins
[element that needs plugin]
if (!$already_included) {
<script src='/path/to/plugin'>
$already_included = true;
}
<script>[do plugin stuff]</script>
Hope that helps.
On May 21, 3:10 pm, Donkeybob <[email protected]> wrote:
> I use three or four jquery plugins for a site. What's the best
> practice in loading all of these files and how much does it slow down
> an app? Do you reference them from another file to keep the page code
> clean? Just a couple of questions to find out about . . . .
>
> Thanks,
> Rich