Closed Thread Icon

Preserved Topic: better to put all script in one set of (script) tags? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17788" title="Pages that link to Preserved Topic: better to put all script in one set of (script) tags? (Page 1 of 1)" rel="nofollow" >Preserved Topic: better to put all script in one set of (script) tags? <span class="small">(Page 1 of 1)</span>\

 
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-14-2000 17:44

If I have several different scripts being used on one page, is there a difference (performance or otherwise) if I put each in seperate script tags, or if I put them all into the same script tags?

Just trying to optimize things.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-14-2000 19:21

Not perfomance wise, I don't think. Presentation is also somewhat important, though, if people might be viewing the source. Keep it organized.

[This message has been edited by Slime (edited 14-07-2000).]

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-14-2000 19:47

You're saying to put it all together? Thats where I am leaning, but want to make sure there isn't any problem with that.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-14-2000 19:49

You're saying to put it all together? Thats where I am leaning, but want to make sure there isn't any problem with that.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-14-2000 20:57

If there *is* a difference performance-wise, it will be better to have them together. If there isn't a difference, it doesn't matter.

Even if there is a difference, it probably won't be noticeable anyway.

timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 07-14-2000 21:28

I don't belive it would effect the performence either way, to the user at least. If the scripts are all separated it normally is more work for the browser to go through all of the <SCRIPT> tags, and connect all of the functions etc. together(if that is what you are doing). Or even to search through all of the <SCRIPT> tags to find a user invoked function. I don't think that anyone will notice a difference either way.

I basically format my script tags in the order that I need them(I am sure most everyone does). They obviously load from top to bottom. If I need the scripts to be preloaded before the content, then I put them in the <HEAD> tag. If that is not neccessary, I leave them in the <BODY> tag.

"There won't be anything we won't say to people to try and convince them that our way is the way to go."
-- Bill Gates

« BackwardsOnwards »

Show Forum Drop Down Menu