Alexander Muxalich2015-02-10 20:59:51
Alexander Muxalich, 2015-02-10 20:59:51

Ajax(pjax) site with comet, websocket. How to implement?

Hello. Actually there is an ajax site, you need to fasten instant messaging to it, comet servers, websockets, long polling come to mind, now the site is stupidly polling every 10 seconds. All the docks are on the Internet, the problem is that this is an ajax site and if you connect comet or websocket`s, the site freezes. Example: the page is loaded, sent by longpolling to the site, after which the ajax links become inactive until the response to the ajax l-polling comes. I read that you can try to get around the problem if you send a polling request to a subdomain. 1. Wouldn't like to reinvent the wheel, can you advise how best to combine messaging and ajax site?

2. Advise, if possible, libraries, scripts for the implementation of a comet server or web-socket`a or long-polling.
It would be nice if there was support for older browsers, for example, through flash.

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Alexander Taratin, 2015-02-10


Viktor, 2015-06-27

Look at my comet-server.ru project, it does not create the problem you describe, or you can look at the js api implementation in it. There, one common connection is created for all the tabs opened by the browser, and not a connection for each tab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question