Does Ajax Need a Server

AJAX needs a webserver to communicate with for it to be able to retrieve any data; otherwise its just talking to a wall. Running the script without a webserver is like trying to make a call with no cell-service. :D. The web server is exactly what is handling all of the details for you.

Do I need a server to use AJAX?

if you dont have a server you cannot send ajax it will be a cross browser issue. as the others says ajax will not work with file:// protocol you need a server to make an http:// call that ajax supports. When you are making AJAX requests using stand alone html files, the HTTP request to the url is made by the browser.

Does AJAX work locally?

9 Answers. Note that you cannot make an AJAX request to the local file system from an external domain in either browser – it would be a massive security flaw if you could.,For this AJAX request to work in Chrome you need to make the request to a webserver. … the file:// protocol) if they originate from there too.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest