I have a list of results Im displaying from the database using php. I query the database based on the search options the user uses and then return the results in a table layout. Im thinking about using jquery and ajax to call the php script instead so I can use something like a loading icon so they know its working instead of the page just hanging waiting for the results.
My question is, would it be faster to call the php script from jquery using ajax and have the php script get the results, build the view then return the view and have jquery just display the view from the output of the php script? Or would it be faster to request the php page from jquery/ajax, have the php script return json object of the results and just have jquery loop through it and build the view inside the jquery function instead?