Well amit, In a chat application, two frames are used.
The top frame stores the last 25 messages, while the bottom frame presents the visitor with a text box to enter their name and another text box for their message. Every 10 seconds, the top frame is refreshed, reflecting the latest 25 messages.
Application variables are used to store these 25 messages. Application variables are a good choice for a simple chatting application. First off, they are super-fast, which is always good; second, they are global to all visitors on the Web site, which is good, allowing all visitors to participate in one communal discussion.
Unfortunately, the messages are stateless. That is, if you post a message, 25 messages later, your message is no longer on the chat board - it has vaporized into thin air. If saving a log of the chat is important, a database could be used to record all comments made. This approach, of course, would be slower than using just application variables.
For more details , Please visit the source site :
http://www.4guysfromrolla.com/ webtech/032200-1.shtml
Answered by
Alok Gupta
, an ibibo Guru,
at
1:00 PM on October 11, 2008