User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 426,139 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,733 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 878 | Replies: 3
Reply
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,905
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Multiple javascript files?

  #1  
Apr 27th, 2007
I am calling a JS file with a <script src=...> tag in the header. It's a rather large file.

The thing is, there is one function in the file that needs a query parameter, and I therefore must pass it to the file, making the file not really cachable.

Should I split this function out into its own JS file? This would allow the majority of my JS code to be cached, but the downside would be the browser client would need to establish a connection with two separate JS files instead of just one.

Thinking about performance here.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: NY
Posts: 195
Reputation: Dukane is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 15
Dukane's Avatar
Dukane Dukane is offline Offline
Junior Poster

Re: Multiple javascript files?

  #2  
Apr 28th, 2007
In today's world of high-speed Internet connections, I don't think this would be a problem. I say go for it and see if the performance really changes considerably.
It is very important to read this: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Multiple javascript files?

  #3  
Apr 28th, 2007
That won't make any difference. Plus by taking advantage of caching you are improving site performance overall which is a good thing.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,905
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Multiple javascript files?

  #4  
May 5th, 2007
Thanks for the feedback
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 4:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC