Return datatypes

recently ive been creating pages that i query with ajax that r soley used to check folders/ files and etc. i was wondering wot kind of datatypes i can return and how?

  • html & javascript i guess just plain text using echo or something?
  • xml i change the header to content-type:text/xml i think i read?
  • json?

thanks in advance for any links or advice!

Ajax will always return a string… What you do with that string is completely open to what you’re able to do with JavaScript.