Twitter New tweets feature?

2019-04-02 06:48发布

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

2条回答
成全新的幸福
2楼-- · 2019-04-02 07:08

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.

查看更多
Fickle 薄情
3楼-- · 2019-04-02 07:22

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.

查看更多
登录 后发表回答