Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does ajax require a web service?

If I want to get data to update partially in a page with jquery (or something else) ajax, does the page I call have to be a web service? Or will just any page that returns json or xml be fine?

I guess I'm asking it like this because in asp.net you have "offical" web services. In other languages and frameworks they may not be like that. I know for example that I can create a classic asp page and return an xml document. Is that a web service?

like image 679
johnny Avatar asked Dec 04 '22 15:12

johnny


1 Answers

It doesn't even have to return JSON or XML--it can return HTML or text that you can just drop into the calling page.

I've used "all of the above" in one place or another.

like image 169
Matthew Groves Avatar answered Dec 06 '22 04:12

Matthew Groves