Twitter New tweets feature?

流过昼夜 提交于 2020-01-01 06:52:10

问题


How does twitter implement the asynchronous notifications for new tweets ?

If it is a form of server push technology, does any one know or suggest how this feature could have been implemented ?

Thanks


回答1:


They don't push. They use the window.setTimeout JavaScript function to periodically poll the Server through AJAX, and if there are new results then they display that notification bar.




回答2:


Twitter does not have push technology. Any asynchronous notifications are done by a third-party application that that checks for new tweets asynchronously. If you are writing your own app, then you are going to be the one to handle this. Twitter does not push tweets out. You will have to constantly go get them.



来源:https://stackoverflow.com/questions/2068626/twitter-new-tweets-feature

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!