I am using AJAX & PHP at server for retriving data from the server after every 10 second cycle. Shoud I use setRequestHeader("Connection", "close"); after every call or remain connection open(Persistance connection) for the puspose of http requests & server load. Please suggest. Ankitrd
A request every 10 seconds shouldn't load a web server too heavily, depending on how many users you expect to have at any one time. Note that a persistent connection requires HTTP/1.1 compatability on your web server. Consider the user first, then see if you have the server-side capabilities to provide that level of service. Try a benchmark between the two of them, and see how well your application responds. Thats my tuppence
Its hard to tell really, I'm not sure what your script is trying to achieve and how much load is expected on each request. Personally I stay away from the theoretical maths, get my hands dirty and do an experiment to see which would be most efficient.