about multiple scripts

R

Ricardo Garcia

hi , in some of my pages i use several files .js, and i wanted to know how
to get the highest performance:
- Joint all my .js in just one, so the http request nonpersistant get
very accelerated
- One file per script, so in many pages i only download the ones that i
use

Thanks
 
R

Randy Webb

Ricardo said:
hi , in some of my pages i use several files .js, and i wanted to know how
to get the highest performance:
- Joint all my .js in just one, so the http request nonpersistant get
very accelerated
- One file per script, so in many pages i only download the ones that i
use

Only include what you need to use.
 
T

Thomas 'PointedEars' Lahn

Ricardo said:
hi , in some of my pages

There are no (Internet) pages, you mean HTML documents,
more often displayed continuously instead of pagewise.
i use several files .js, and i wanted to know how to get the highest
performance:
- Joint all my .js in just one, so the http request nonpersistant get
very accelerated

Don't. You would include more features (and force the user to download
the respective source code) that you don't use than you actually use.
- One file per script, so in many pages i only download the ones that
i

I don't understand what you mean by "script", maybe you mean "function" or
"method". If so, group functions/methods serving a similar purpose and
preferably those that depend on each other in one script file, so you have
to include only those functions that you actually use. You can find
examples at <http://pointedears.de/scripts/>.


HTH

PointedEars
 
T

Thomas 'PointedEars' Lahn

Ricardo said:
hi , in some of my pages

There are no (Internet) pages, you mean HTML documents,
more often displayed continuously instead of pagewise.
i use several files .js, and i wanted to know how to get the highest
performance:
- Joint all my .js in just one, so the http request nonpersistant get
very accelerated

Don't. You would include more features (and force the user to download
the respective source code) that you don't use than you actually use.
- One file per script, so in many pages i only download the ones that
i use

I don't understand what you mean by "script", maybe you mean "function" or
"method". If so, group functions/methods serving a similar purpose and
preferably those that depend on each other in one script file, so you have
to include only those functions that you actually use. You can find
examples at <http://pointedears.de/scripts/>.


HTH

PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top