I have a website that is running php/MySQL to query and return results. The result set is over 40,000 and the query is getting slower. I want to find a simple way to display a loading image while the page builds. I can do it with any page running JavaScript but I assume since php is server side I need to handle the loading differently.
I see that AJAX has a load() function where I can call the php page and presumable show a loading image while the request is loading. Is that the best way? I can't believe that there aren't lots of example scripts floating around since this has to be a very common problem.