[jQuery] Re: comet long polling with jquery
hello, I finally got my server to run an example comet application, which uses the long polling method. The example code I got uses prototype library, which i dont want to use. I understand there is a comet plugin for jquery that supports the bayeux protocol, which is not what I want. Searching in this group, I have read that the long pollling method does not require a plugin, and just the standard ajax methods are ok. What I need to do shortly, is to submit an ajax request, (which will only be replied when the server sends data) when the server sends data (it sends success in the body, and json data in the response header), the ajax method must process the json data, and restart itself making another ajax request. also, this ajax request should start at document ready. Any ideas? Best, -C.B. This should get you started: (function($) { $(document).ready(startComet); function startComet() { $.ajax({ url: 'myCometServer.php', complete: onComplete }); }; function onComplete(xhr, status) { if (status == success) { var json = xhr.getResponseHeader('myCometHeader'); $.globalEval('('+json+')'); startComet(); } else { // handle errors } }; })(jQuery);
[jQuery] Re: Comet Technique - possible with jQuery? Plugin?
Thank you! With the Bayeux implementation, what will that allow me to do? I am already using ajax calls in my page to get my words and to keep the x/y for each element, you can see by going to the site. Then a comet server? What is the real advantage there? Thanks On Apr 6, 4:19 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: coughlinsmyalias schrieb: Hey, I have been doing some research on Comet to use on my site: http://rksdesignstudios.com/magnet/- To try to keep it live as possible almost to push the content to see other changes and keep the page constantly updated. I did a search here on the group but really didn't find anything, any ideas on what I can do? Is there a plugin or other technologies I can do using jQuery to achieve my goal? Implementing long-polling Comet with jQuery doesn't need a plugin. Just use jQuery's ajax methods. If you are looking for a Bayeux implementation:http://plugins.jquery.com/project/Comet In any case implementing the serverside is the more difficult part, though there are plenty options for Comet servers. A great resource for that ishttp://cometdaily.com/ Jörn
[jQuery] Re: Comet Technique - possible with jQuery? Plugin?
coughlinsmyalias schrieb: Hey, I have been doing some research on Comet to use on my site: http://rksdesignstudios.com/magnet/ - To try to keep it live as possible almost to push the content to see other changes and keep the page constantly updated. I did a search here on the group but really didn't find anything, any ideas on what I can do? Is there a plugin or other technologies I can do using jQuery to achieve my goal? Implementing long-polling Comet with jQuery doesn't need a plugin. Just use jQuery's ajax methods. If you are looking for a Bayeux implementation: http://plugins.jquery.com/project/Comet In any case implementing the serverside is the more difficult part, though there are plenty options for Comet servers. A great resource for that is http://cometdaily.com/ Jörn
[jQuery] Re: Comet Technique - possible with jQuery? Plugin?
*bump* On Apr 5, 2:57 pm, coughlinsmyalias [EMAIL PROTECTED] wrote: Hey, I have been doing some research on Comet to use on my site:http://rksdesignstudios.com/magnet/- To try to keep it live as possible almost to push the content to see other changes and keep the page constantly updated. I did a search here on the group but really didn't find anything, any ideas on what I can do? Is there a plugin or other technologies I can do using jQuery to achieve my goal? Thanks, Ryan
[jQuery] Re: Comet
Great, I've been doing some Comet last year for a project. It's great but really geeky for some people, so developping a plugin around that sounds just great to me :). I'll check the work asap! On Jan 9, 3:01 am, Morgan Allen [EMAIL PROTECTED] wrote: I have been working on implementing the Bayeux protocol in jQuery and with the recent talk on the list about LIVE ajax and server pushing I thought now would be a good time to release the early work and start getting some feedback. It will work on Jettys Cometd Echo Demo. To get it to work, remove all the dojo scripts, and jquery and this plugin. In your on ready add $.comet.init('/cometd'). Bind a listener to an element listening for '/service/echo' and publish ($.comet.publish) a message to the echo service $.comet.publish('/service/echo', {msg: 'what ever message'}). The second param of the event trigger will be that data return from the Cometd server. Subscriptions are a bit shaky at the moment, I am rewriting the chatroom demo to ensure it is working. Check out the code athttp://morglog.alleycatracing.com/wordpress/?p=20 and the project page athttp://plugins.jquery.com/project/Comet --http://morglog.alleycatracing.com Lets make up more accronyms! http://www.alleycatracing.com LTABOTIIOFR! ROFL! ROFL! ROFL! Upcoming alley cats, reviews, touring logs, and a general congregation of bike nerdity.
[jQuery] Re: Comet calls/multiple open HTTP connections
David, I'm using jQuery 1.2.1 (I love it... the selectors are most awesome and it has a very functional flavor) I've got a situation that I've seen on Firefox 2.0 (it may be an issue on other browsers.) It seems that I can only have 2 pending HTTP requests from the browser to the same server at a given time. Firefox has configuration settings that limit the number of concurrent connections to servers as well as to per server. Here's a blog entry with more information: http://prefetch.net/blog/index.php/2005/01/20/speeding-up-firefox/ Make sure to read the section on network.http.max-persistent-connections-per-server, which defaults to 2. -Dan
[jQuery] Re: Comet Client Plugin and ie7
Seems to work okay with IE 6. Ransom Fitch On Aug 22, 10:33 am, Messiahs [EMAIL PROTECTED] wrote: it seems that the comet plugin doesn't run correct with ie7. When i watch the demo at:http://empireenterprises.com/_comet.html with FF there are messages like {idx:1,message:}, {idx:2,message:} and so on. with ie7 only the message {idx:1,message:} appears.
[jQuery] Re: Comet
http://docs.jquery.com/Plugins On May 24, 2:15 pm, peter [EMAIL PROTECTED] wrote: You are quite right. But this address is not advertised anywhere that I can find. You have to go snooping around, and look at the source code for the page. The problem is that there doesn't seem to be a centralized place for downloading advertized plugins. This isn't the only plugin suffering from this problem. Peter On May 24, 9:51 pm, Sean Catchpole [EMAIL PROTECTED] wrote: I assume you are talking about this plugin:http://empireenterprises.com/_comet.htm Then you can download it here:http://empireenterprises.com/_share/jquery.comet.js ~Sean
[jQuery] Re: Comet
For those interested, I've added a download link to http:// empireenterprises.com/_comet.html in order to make it seem more accessible. -g On May 25, 2007, at 8:45 AM, MikeR wrote: http://docs.jquery.com/Plugins On May 24, 2:15 pm, peter [EMAIL PROTECTED] wrote: You are quite right. But this address is not advertised anywhere that I can find. You have to go snooping around, and look at the source code for the page. The problem is that there doesn't seem to be a centralized place for downloading advertized plugins. This isn't the only plugin suffering from this problem. Peter On May 24, 9:51 pm, Sean Catchpole [EMAIL PROTECTED] wrote: I assume you are talking about this plugin:http:// empireenterprises.com/_comet.htm Then you can download it here:http://empireenterprises.com/_share/ jquery.comet.js ~Sean
[jQuery] Re: Comet
I assume you are talking about this plugin: http://empireenterprises.com/_comet.htm Then you can download it here: http://empireenterprises.com/_share/jquery.comet.js ~Sean
[jQuery] Re: Comet
You are quite right. But this address is not advertised anywhere that I can find. You have to go snooping around, and look at the source code for the page. The problem is that there doesn't seem to be a centralized place for downloading advertized plugins. This isn't the only plugin suffering from this problem. Peter On May 24, 9:51 pm, Sean Catchpole [EMAIL PROTECTED] wrote: I assume you are talking about this plugin:http://empireenterprises.com/_comet.htm Then you can download it here:http://empireenterprises.com/_share/jquery.comet.js ~Sean