Auction page, how to sync refresh show Highest price
Source: Internet
Author: User
Auction page, how to sync refresh to show the highest price?
There is a product auction page that displays the highest bid for the current item in a Div.
If a user submits the latest price, all the people who open the page will see the "highest bid" number on the page automatically refreshed.
This feature has been implemented by the website, but I did not study how he did it, as if Ajax were not refreshed every second (if so, it would be a big burden on the server).
I suddenly think of the previous chat room program, and when you enter the chat room, even if you do not speak, others can immediately refresh the words to see.
Expert help pointing out the idea ...
------Solution--------------------
Push?
------Solution--------------------
Grab a clutch and see if they're using the main motion or the action ... Not good people are Ajax ...
------Solution--------------------
Since
there's no research on how he did it, how can you say that it's
not Ajax refresh every second ?
------Solution--------------------
Ajax is constantly brushing.
JSON data.
http://www.4.cn/api/auction/live/aid/88261/sid/?_=1329709450395
------Solution--------------------
Explore
Reference:
Waiting for a long while did not see a refreshing ....
http://www.4.cn/auction/detail/aid/88261
------Solution--------------------
There is a kind of thing called long-polling. Do not know is ...?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.