Ajax gets background data,,, is this data written in the database?
Reply content:
Ajax gets background data,,, is this data written in the database?
First answer the question, can be, or can not.
Then explain why, Ajax send XHR packet to the backend, after the back-end parsing a series of operations (adding or deleting data, etc.). For example, you register the user to submit the registered data with Ajax, then send to the backend, back-end processing, that is, insert into the database operation. Next, return a result. The callback function of Ajax is based on the result of this return, which is followed by the client.
This data is generated by the background on request . Can be native database content, can be processed content, can be something else
database, file, session, custom data can also wait
Php,java,python,nodejs Getting Data
Convert into Json,xml
Ajax recognition
In fact, this background and the front-end interaction, is through the interface to carry out, can also be said to be API.
The specific embodiment is json,xml and other exchange formats.
It's like two people, one Chinese, one Japanese, you can't speak Japanese, I don't have Chinese.
But we all know English, so we first translate it into English.
How did this English come from? Can be found in the book on the translation of the sentence, or you can think of it.
Many ways.