问题
I am interested in HTTP PUSH technologies. I am interested in the technology behind pages like Yahoo Finance etc, which are able to update the page with data in real time.
When I checked the FF console, there are no periodic POSTs from the client which suggests that the client is not polling, rather it is having data PUSHed to it.
I then checked the page source - (AFAICT) they are NOT:
- using a java applet
- using a hidden iframe
- using any custom client side JS library (like APE etc)
So HOW are the pages being updated in real time?.
Can anyone explain the technolgies used to put together such a page - a link to a simple demo would be most useful.
回答1:
The techniques for HTTP PUSH and the like are
- Comet Technology
- WebSockets
- Java Applet / Flash WebSockets / SilverLight?
- Server-sent Events and EventSource
- HTTP server push
The Push technology article on wikipedia is a good read.
The Transports at socket.io should give you examples of how to implement these technologies.
来源:https://stackoverflow.com/questions/6759192/how-do-pages-like-yahoo-finance-update-page-without-plugins-etc-http-push