Which of the following statements can be executed before both ajax and post are submitted? Is post executed after ajax returns? Which of the following statements can be executed before both ajax and post are submitted? Is post executed after ajax returns?
Reply content:
Which of the following statements can be executed before both ajax and post are submitted? Is post executed after ajax returns?
The speed should be similar, but ajax has an advantage in interaction. for example, the traditional post will allow the browser to enter another page. at this time, if the user clicks the refresh button, the browser will submit it again, another example is logon. if a user who fails to log on is kicked back to the logon page, the user must perform a network request again. ajax can solve these problems.
Traditional post requests reload the entire page. Although the browser will cache by default, some resources do not need to be reloaded. However, ajax is slightly faster when transmission speed is simply taken into consideration, however, it is not clear whether ajax post requires some parsing work, so the difference is not too big. how to do it depends on your needs.
Of course, it is to first execute js and then execute form events.