views:

82

answers:

2

A good example of what I want is a chat system, where I send a message to someone and he can instantly see my message and vice versa.

So I want the best way to track if in the database there is a new answer for me if yes then show it with AJAX.

Example Websites:

  1. Twitter
  2. Friend Feed
+2  A: 

You probably want to look at Comet, or one of the other push technologies

Steve Weet
I have already read about Comet or any other push technologies, but how to use it?
CIRK
@CIRK - read more. I'm sure there are working examples out there for you to find.
Matchu
A: 

You could use AJAX, but if you have a limited audience or won't be going live for a while, you might want to look into HTML 5 Web Sockets (it's currently only supported by a few browsers). With it, you could open sockets to the browsers that want to chat. All messages will be relayed over the Web server, so the chatters won't be able to find out the IP address of another participant.

Gert G