473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

about multiple scripts

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
Jul 23 '05 #1
3 970
Ricardo Garcia wrote:
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.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Ricardo Garcia wrote:
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
--
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
Jul 23 '05 #3
Ricardo Garcia wrote:
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
--
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Paul Miller | last post by:
Some background first - we have some software that embeds a Python interpreter into a host application. Scripts are loaded dynamically and used. But we want to support the ability to edit scripts...
2
by: bmatt | last post by:
I am trying to support multiple interpreter instances within a single main application thread. The reason I would like separate interpreters is because objects in my system can be extended with...
4
by: Jason | last post by:
Looking for some insight from the professionals about how they handle row inserts. Specifically single row inserts through a stored procedure versus bulk inserts. One argument are people who say...
0
by: Joseph S. | last post by:
hi all, debugging PHP applications interactively is possible, easy and free. I am talking about PHPEclipse and using it for debugging over several scripts or debugging through a session. Since I...
2
by: Dave Hughes | last post by:
Just noticed something rather annoying after upgrading my test box (a Linux server running DB2 UDB v8 for LUW) to fixpak 11 (for reference it was previously on fixpak 7). In the past I've relied...
2
by: vmalhotra | last post by:
Hi I am new in python scripting. I want to open a Multiple telnet session through once script. In other way i can tell i want to open two linux consoles through one script. I wrote one...
1
by: Italian Pete | last post by:
Hi, I have a usercontrol which includes a small piece of Javascript built up as a string in <scripttags and put onto a web page when an instance of the User Control is created. The Javascript does...
1
by: Memphis Steve | last post by:
Is it possible to combine multiple javascipts into one file and then call that file from a linked URL in the head section of an XHTML file? Here are the two scripts I want to use with the...
2
by: sabbadin12 | last post by:
Hi, I'm going to work on an application that uses a postgreSQL database so that it can uses SQLServer 2005. I think I solved most problems on the programming side, but I still have some doubts...
1
by: Daniel Kaplan | last post by:
I know I can have multiple scripts on one HTML page (at least I think I know I can). i.e. <script language="Javascript" type="text/javascript" src="../js/mainbutts.js"></script> ...html...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.