Home > Backend Development > PHP Tutorial > javascript - Display server processing progress in the front desk, similar to delivery effect

javascript - Display server processing progress in the front desk, similar to delivery effect

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-06 13:53:14
Original
926 people have browsed it

I want to know how to achieve a similar delivery effect, that is, one-stop delivery, and the front desk shows that the first order, the second order, and the third order have been shipped. . .
How do you know where the server is processing if ajax is used? It would be best if you could post a simple demo. Thank you

Reply content:

I want to know how to achieve a similar delivery effect, that is, one-stop delivery, and the front desk shows that the first order, the second order, and the third order have been shipped. . .
How do you know where the server is processing if ajax is used? It would be best if you could post a simple demo. Thank you

The simpler one is ajax polling
The more complicated one is websocket

You must have seen similar websites, open 控制台->网络 and see how the request is sent, you will probably have an idea

As @dryyun said, you can achieve the effect you want through Ajax polling/long polling or WebSocket technology.
I have written a series of related articles that you can read. If you don’t understand, you can contact me:
Comet - a new technology that emerged with the rise of AJAX technology
Ajax polling - "timing" Query the server through Ajax"
Unveil the mystery of Ajax long polling in plain English
Simple and easy-to-use chat room technology - WebSocket

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template