Home >Backend Development >PHP Tutorial >javascript - How to switch pages when ajax does not end (when background thinkPHP does not process completion)?
HTML page ajax accesses the php backend. Since php responds slowly, when I want to switch pages, I find that the page is stuck and blocked. How to solve this problem? I would be very grateful if you could explain the principle.
HTML page ajax accesses the php backend. Since php responds slowly, when I want to switch pages, I find that the page is stuck and blocked. How to solve this problem? I would be very grateful if you could explain the principle.
If this ajax request requires background processing of time-consuming tasks, it can be resolved asynchronously.
If you need the response content after the server processes it, you can use websocket.
What do you mean by switching pages?
Ajax response time is slow. It has nothing to do with your page being stuck. Please give me more details
First of all, check whether asynchronous requests are used. If so, then the two things you mentioned should be unrelated, right?