A consideration with using php (or any other server-side language) is that the server is probably set to send headers saying php output is html. With Ajax you may sometimes be using html, but often xml or plain text is more appropriate. For those cases, you should send the appropriate header for the format of the response. In php, this is done with the header function. other server-side languages have similar functions.
The header needed is Content-Type. For xml you want the value set to text/xml, and for plain text text/plain. it
No Comments for this page.