How can i get latest fresh data from server if in server happened new event (for exemple there are 2 users x,y and x send message to y and y get message without refresh page like fb chatsystem ) ?
I dont want to use setInterval because it repeat all message again and again.

Websockets is what you're wanting. You may still run into issues with browser support, but then again, there are work arounds you can use as well.
Websockets allow for data to be pushed to a client, rather than a client requesting data.

I would probably check out http://socket.io/ as they have an example of a chat system built using their stuff, which utilizes websockets.
There are other options as well like https://www.pubnub.com, or you could go further and develop your own solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.