Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Including multiple .js files in .jsp pages


Message #1 by John Owen <JOWEN@f...> on Tue, 13 Nov 2001 08:18:16 -0600
I don't know about jsp in particular but in general I would think its 
better to break it up and just include the functions you want where you 
want them (though its not always easy to get the balance right in 
practice).

From resources point of view it seems its a choice between:
1. big file with all in: just one HTTP GET but extra time to include 
unwanted routines.
2. small files: less download time but more HTTP GET's (one per included 
file).

HTH
Phil
> Is it "ok" to include multiple javascript files in jsp pages? Or should 
you
> just put any functions you will need in one and include it in all pages 
that
> need the functions? I wanted to group certain functions together into
> separate files and use them when appropriate. I haven't read anything 
that
> says don't do this, but I wanted to get other opinions. I am also 
curious to
> know if one way or the other affects the amount of resources taxed by the
> system.
> 
> Thanks,
> 
> John Owen
> Senior Developer
> Federal TransTel

  Return to Index