Comet applications without IFrames

I'm just starting to create an AJAX application using push on the server side. I am using Grizzly Comet on Glassfish V2. Almost all sample applications use IFrames to update client-side content. I want to use only JavaScript . Are there any such application examples (preferably those that do not use the JavaScript library)?

+3
source share
2 answers

The point is that an HTTP request never ends. Not all client implementations handle this correctly. As I see it, it is possible to do this using pure javascript in Firefox with its extensive API, but the XMLHTTPRequest object will time out and will not be able to transmit content to you.

IFrame is good, you can also try an object tag if it meets the compliance standard.

Before XMLHTTPRequest and Ajax did not have a name, we used to receive data from servers through IFrames.

+3
source

This is how I understood how to push using only javascript and php.

Ask javascript to make the initial call and load the contents into a div. Then run the javascript call back to php and try sleep mode until you see a new update. Then send the data to everyone and call php and sleep again.

. 5 30 php script.

+1

All Articles