473,378 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ajax web chat

Tem
Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages

Tem

Dec 6 '07 #1
5 3308
On Dec 6, 3:13 am, "Tem" <tem1...@yahoo.comwrote:
Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages

Tem
Hi,

Nowadays, the answer is quite simple and you can emulate this behavior
using an UpdatePanel and a TimerControl from the AJAX tool kit.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com
Dec 6 '07 #2
On Dec 5, 11:13 pm, "Tem" <tem1...@yahoo.comwrote:
Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages

Tem
With the chat app that I did I used a hidden IFrame that refreshed
every second and if it had a new message it posted it to your screen,
but I also had to do it entirely in ASP (not ASP.NET). If I were to
redo it I would probably have used AJAX controls or Web Services.
Dec 6 '07 #3
actually it does. it uses an iframe and server push instead of polling
the server for updates. it then uses dhtml to update the display. as
this ties up a connection, you would have trouble doing this with
asp.net and a lot of users.

-- bruce (sqlwork.com)

Tem wrote:
Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the
server to get new message?
other web based chat room have to constantly refresh the page (every 10
sec) to get new messages

Tem
Dec 6 '07 #4
Tem
Could you explain "server push instead of polling
the server for updates"

I thought the client has to submit a request first to get a response from
the server

Thanks
Tem

"bruce barker" <no****@nospam.comwrote in message
news:#M**************@TK2MSFTNGP02.phx.gbl...
actually it does. it uses an iframe and server push instead of polling the
server for updates. it then uses dhtml to update the display. as this ties
up a connection, you would have trouble doing this with asp.net and a lot
of users.

-- bruce (sqlwork.com)

Tem wrote:
>Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the
server to get new message?
other web based chat room have to constantly refresh the page (every 10
sec) to get new messages

Tem
Dec 7 '07 #5
Here I've detailed the code for an AJAX based chat room that seems to do
what you desire:
http://SteveOrr.net/articles/WebChat.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Tem" <te*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Could you explain "server push instead of polling
the server for updates"

I thought the client has to submit a request first to get a response from
the server

Thanks
Tem

"bruce barker" <no****@nospam.comwrote in message
news:#M**************@TK2MSFTNGP02.phx.gbl...
>actually it does. it uses an iframe and server push instead of polling
the server for updates. it then uses dhtml to update the display. as this
ties up a connection, you would have trouble doing this with asp.net and
a lot of users.

-- bruce (sqlwork.com)

Tem wrote:
>>Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the
server to get new message?
other web based chat room have to constantly refresh the page (every 10
sec) to get new messages

Tem
Dec 11 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jason.m.ho | last post by:
Hello! I am trying to build an ajax chat system. Currently I have it so that when you chat, you upload your message to the database, and each client is polling that database to see if he/she has...
8
by: jason.m.ho | last post by:
>From the common user perspective (like my grandma), why would they care if its a java applet or an ajax application? Say I want to make a chat system on my website...If i'm doing really involved...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
1
by: quill | last post by:
Hi I am making a chatroom script and it appears that the problem seems to be that my setTimeout's are conflicting. The logic is as follows: Run a login check every x seconds Run a trigger...
3
by: work.Yehuda | last post by:
I'm Trying to write a chat width AJAX. For so far it works fine in Firefox browser, The only problem I had is width the Explorer. The function setTimeOut doesn't seem to work well width AJAX. The...
4
by: Gandalf | last post by:
I wrote a chat width AJAX. In my home wampserver apache it works just fine. The problem starts when I trying to upload the chat in to my real server. The chat prints error 403 in places which it...
3
by: John Doe | last post by:
Heres what I am trying to do: I have a div on my web site that runs a little php page via ajax with a javascript timer every 15 seconds or so. I can get the php page to load up the database i...
6
by: John Doe | last post by:
Here's my issue: I have an instant messenger type feature for my site, its basically an ajax IM feature. I run with a mysql backend on the site, i have a div on my main page that runs a javascript...
2
by: John Doe | last post by:
Here's my issue: I have an instant messenger type feature for my site, its basically an ajax IM feature. I run with a mysql backend on the site, i have a div on my main page that runs a javascript...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.