Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any jQuery functions or plugins for comet on apache?

I have seen this question before and found this example in http://www.zeitoun.net/articles/comet_and_php/start which is really great and clear. However, it uses javascript.

My question is, are there any plugins, functions or something that would help me to implement PHP comet with jQuery easily? Because given example requires lots of javascript code.

And by the way, I want to use it on Apache. Is it possible?

like image 681
good_evening Avatar asked Dec 27 '22 21:12

good_evening


1 Answers

If you are only doing long polling then jQuery will work fine. However, jQuery does not expose a readyState === 3 event, so there is no built in way to get data as it is streaming if that is the direction you want to go.

[Edit] Here is the bug, #1172

And it looks like they added the functionality in 1.5, using a Prefilter

So yes, you can do all the comet stuff with jQuery now :)

like image 91
Andrew Avatar answered Dec 30 '22 10:12

Andrew