The request returns without response when POST is submitted (normal request from Google, no response from Firefox)

When I was submitting just now, I encountered a problem and made a note: the request returned no response when POST was submitted (normal request from Google, no response from Firefox)

look at the picture

firefox not responding
No response when requested, and no status returned

 no response data

 POST request code.

In fact, there is nothing wrong with writing. However, after searching, I found out that the page was refreshed before the server responded when the request was sent! Therefore, there is no response when the request is made, the reason: the interface is asynchronously caused

 

 

In the code, replace ajax with synchronization, that is, modify async= false (refer to: ajax request has no status code, which is canceled )

 

Asynchronous to synchronous, the request is successful!

Guess you like

Origin blog.csdn.net/u014538997/article/details/109276344