[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

simple chat

I developd a simple chat, browser relaod every X secconds and dsiplays messages saved on a database.

I have problm with some pcs/browsers sometime the page cant reloan and then chat is terminated, so I wonder if there is a better way to reaload and check for new messages, I see messenger.providesupport.com web chat uses somethings else, anyone has a recomendation here?

0
RIOSmx
Asked:
RIOSmx
  • 3
  • 3
1 Solution
 
wassa_rCommented:
The simplest way to do it is the way you did it. It shouldn't terminate the chat if you can't reach the server though, try building in some error checks so that it doesn't die if anything fails ( try / catch ).

You could also try something like "Comit", but that's a lot harder to use.
0
 
RIOSmxAuthor Commented:

Thanks WASSA , well, youre right, chat keeps going . What I meant is that that particular browser/user get a not found error on the chat window, so, it look like its terminated , if he reloads the page chat goes on. I just wat to avoid that. Whats Comit ?
0
 
wassa_rCommented:
If you use AJAX then you poll the server for information, if you use comit, the server will push the information to your server. This way you don't need to do requests every few seconds, as new data is automatically pushed to you.

Are you displaying the error yourself? You normally don't get a message if the page is not found.. Can you show me an example of your chat window?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
RIOSmxAuthor Commented:


sure thing...  take a look

http://r1os-techsupport.com/soporteenlinea/bbchat_login.php

i would like to learn about how to the thepush instead of the refresh, any pointer?
0
 
wassa_rCommented:
0
 
RIOSmxAuthor Commented:

what browser did you use to access the chat ?

Ill take a look at comet tnx !
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now