Suppose I have 3 js files, how will it affect the load time if I compile it to a single one? Is it wise to do so?
Suppose I have 3 js files, how will it affect the load time if I compile it to a single one? Is it wise to do so?
If you use the Mozilla Firefox browser you can install the Firebug and YSlow plugins and they will tell you more statistics than you want to know, as well as allow access to an insane level of browser debugging. In particular, YSlow will tell you load times and so forth so you can compare the separate and combined load times.
Two rules of development:
1) Computers work for people; People do not work for computers
2) Maintainability is all that matters.
In terms of networking, it will be faster, but not anything significant or measurable. In general, you don't have to worry about how fast plain text files will be downloaded, unless it's especially large. Images and other types of media account for most of the load time on your average web page.
When you program, you should be concentrating on the readability of your code. With how powerful computers and networks have become, making your code readable and easy to follow is more than worth it because you don't have worry about resources, and it will save you so much time if you have/want to update anything later. Unless you are developing for a server that receives alot of traffic (like several hundred hits a minute), performance is not an issue when delivering your average HTML page.
Well, it's always an issue, but not as much important. (loading speeds, that is)
█ Xavier L | Community Public Relations Manager (Free Hosting Support)
█ Yes, my position is too cool to even exist!
█ How am I helping? Rate this post by clicking theicon below! (this is even better than "liking" a post)
█ Terms of Service | Acceptable Use Policy | x10Hosting Wiki
Hmm, thanx for the advice..!