I am a self-developed web page and want to use ajAx technology. Does this technology require the browser to request information from the server, then the server responds, and returns information, and then the browser processes the information? What should I do if I have no server on my local computer? If I have a server, I am in the service... I am self-taught as a web page and want to use ajAx technology.
Does this technology require the browser to request information from the server, then the server responds, and returns information, and then the browser processes the information?
What should I do if I have no server on my local computer?
If I have a server, how can I write it on the server to receive requests sent by the browser? Return information? Is it in javascript? Or do I need to use Node. js and PHP to operate the server?
Hope someone can give me some tips. thank you first.
Reply content:
I am a self-developed web page and want to use ajAx technology.
Does this technology require the browser to request information from the server, then the server responds, and returns information, and then the browser processes the information?
What should I do if I have no server on my local computer?
If I have a server, how can I write it on the server to receive requests sent by the browser? Return information? Is it in javascript? Or do I need to use Node. js and PHP to operate the server?
Hope someone can give me some tips. thank you first.
AjAx Debugging requires the server.
However, the so-called server is not necessarily a real server, but is just an http service that can provide data return. you can build it locally (you can use node. js and so on)
There is no essential difference between ajax server data and common http services (the only difference is actually data content (format)-according to your program definition)
All ajax requests are actually common http requests. you can even build a fully static http service to support ajax program debugging. of course, if you want to debug complicated ajax programs, the server also needs to be able to process some dynamically transmitted information.
However, generally, ajax programs are developed by the customer and the server.
The browser sends an ajax request --> the server receives a browser request --> the server processes data --> returns data to the browser --> the browser processes
Https://cnodejs.org/api/v1/topics this is an interface provided by other websites
Each computer can be viewed as a server.
Nodejs, you can try the Express application generator to quickly create an application skeleton.
Generally, in the case of AJAX, you do not need to configure your own servers. cross-domain APIs can be found on the Internet.
Just create an integration environment wampserver locally.
We recommend that you use the PHP framework www.phalapi.net, which is simple and easy to use.
You can quickly get started with the back-end write interface
The front-end information is submitted to the server through ajax. after receiving the information, the server returns the response data to the client. then, the client receives and processes the response data from the server. At this time, we can understand that ajax is an http server that is used to provide the frontend to initiate an interaction with the server. A server usually needs to write an api in a background language to expose the api to the frontend for use.
You request the server address, and then the server address. you only need to parse the returned data.
I also started to learn about it myself. Currently, I use wampserver to build a local server with PHP and Apache servers.