January 17, 201313 yr Hi guys I would like to implement Comet programming in my website I mean something like Facebook.com; when some thing happens in server side like inserting new data to database, the web server automatically and with out any request from client send its data to client I have googled about this and I have found two solutions (called streaming) which are not good at all 1. using hidden iframe 2. using AJAX they both use an infinite loop and request to the server which is not optimized because it overloads the server. what Im looking for is called long polling, do u guys know how to implement it? tnx alot Edited January 17, 201313 yr by stallman3738
January 17, 201313 yr Author More info: http://adf.ly/203878...toringbooks.com Hi, tnx for replying I saw this page but there was nothing relevant to comet programming using php!
January 18, 201313 yr Hi guys I would like to implement Comet programming in my website I mean something like Facebook.com; when some thing happens in server side like inserting new data to database, the web server automatically and with out any request from client send its data to client I have googled about this and I have found two solutions (called streaming) which are not good at all 1. using hidden iframe 2. using AJAX they both use an infinite loop and request to the server which is not optimized because it overloads the server. what Im looking for is called long polling, do u guys know how to implement it? tnx alot I know think its 100% as good as comet programming which i dont know to much about comet programming but why not just simply use ajax through jquery and php. you can refresh divs/content as needed through the use of a javascript function that makes an ajax request to a php file and usinh setInterval which will check for content every set number of seconds which you can set yourself
January 18, 201313 yr Author I know think its 100% as good as comet programming which i dont know to much about comet programming but why not just simply use ajax through jquery and php. you can refresh divs/content as needed through the use of a javascript function that makes an ajax request to a php file and usinh setInterval which will check for content every set number of seconds which you can set yourself because in log polling when you open a connection between client and server it will remain open as long as you want that is why this is much more faster than simple ajax and setting interval.
Create an account or sign in to comment