Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.

Lionsanime Directory   1,000 Directory Submissions   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 09-27-2004, 02:12 AM   #1 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
Using a single external scripts file?

Hi.
I read somewhere that if I place all of my javascript code in a single file and link to that file in the html code of all the pages of my website,it would load fast.However I want to use different files to store my code,since it lets me keep my code organized.I mean that I want to put all the code related to a certain category in one file,and code related to other categories in seperate files.E.g all the code related to form submission would be in one file,while all the code related to page decoration would be in another.But in that case,if the user visits my homepage,then visits page A,and then goes to the page involving a form submission,the code for the form submission would be loaded as new code.Would it slow down the loading of the page?What should I do?
thanks!
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 09-28-2004, 12:40 PM   #2 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
do these forums even get moderated?
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-28-2004, 12:43 PM   #3 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
Quote:
Originally Posted by digitman
do these forums even get moderated?
What does that have to do with anything?
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-28-2004, 12:45 PM   #4 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
I mean,this post(and some other posts of mine) are left unreplied for days.Isnt it the job of the moderators to keep all forums active?
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-28-2004, 12:46 PM   #5 (permalink)
Inactive
 
Pipeline-Webdesign's Avatar
 
Join Date: 02-11-04
Location: Corpus Christi, TX
Posts: 901
iTrader: 0 / 0%
Latest Blog:
None

Pipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the rough
Send a message via AIM to Pipeline-Webdesign Send a message via MSN to Pipeline-Webdesign Send a message via Yahoo to Pipeline-Webdesign
uh oh... afraid to see what happens!!! *hides under shelter*
Pipeline-Webdesign is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-28-2004, 12:48 PM   #6 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
nah,I didnt mean to offend anyone.It was just a question.Sorry jazzee.
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-28-2004, 12:49 PM   #7 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
Try using line breaks and add spaces after punctuation to make your post more readable.
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 09-28-2004, 01:16 PM   #8 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,941
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
digitman, I am not a moderator so I cannot speak for them, but this is isn't a technical support site it's an online community. We are all here to help eachother when we can. The moderators shouldn't be expected to know it all especially answer all the questions directly. To be totally honest isn't this more of a programming question rather than a design issue? This probably would have been answered quickly in the coding forum.

On that note, the answer to your questions is pretty simple. When writing html/javascript code. You want to minimize what you send to the user. If you number 1 priority is speed. Then less is better. The main reason you want to use 1 include file is more for maintenance/updates when using the same code in multiple pages. Do you want to modify the code 30 different times or just once.

What you don't want to do is create 1 HUGE javascript file that has every function especially on pages that do not need this. Remember we are talking about performance here. If the file is 100KB the page will load much faster than if the file is 500KB.

Bottom line create mutliple include files and include them on each page as needed. Hope this answers all your questions.

imaginemn
__________________
Imagine Creative Services
Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link javascript to an external file? NameJunky Coding Forum 3 01-25-2008 02:47 AM
How do you make an external HTML file load into a slice in Fireworks? ChetG Web Design Lobby 8 09-05-2007 02:51 PM
Moving Java Script to an external file redgsr SEO Forum 7 01-09-2006 06:02 AM
How can I insert a menu in text form into an external .css file Jason Web Design Lobby 1 11-19-2004 08:38 AM
linking to an external .css file Jason Coding Forum 2 11-17-2004 09:26 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 08:13 AM.
© Copyright 2008 V7 Inc