Don’t get me wrong – I was Ajaxing madly with ActiveX back when everyone was absolutely positive that JavaScript in general was diabolic and not long for the web, and this post isn’t to discourage anyone from using in-page HTTP requests, but rather to use them more wisely. If you have a rotating banner and need to fetch a new ID every 10 seconds, from a total of say 5 possible banner IDs, please don’t make a new request every 10 seconds. Get the whole list on page load, and rotate them with standard JS methods. Grabbing 10 numbers from the server once is not going to waste appreciable bandwidth, and the savings on the repeated requests will surely outpace the initial extra load of 4-8 b (yes, “b”) as soon as one person leaves the page open and goes to visit grandma for the weekend.

Seeing “major” players (*cough* amazon) makes you wonder…