SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Ajax Chat

  1. #1
    SitePoint Evangelist bals28mjk's Avatar
    Join Date
    Aug 2007
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ajax Chat

    Hey guys.

    If I was writing a chat program, is there a more efficient way of updating the chat file other than making an ajax request for the updated file every x amount of seconds?

    Thanks, cheers.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Nope
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Flash is capable of holding a socket connection to the server open. This lets the server decide when to push new data out to the clients. The client then just listens for updates, and updates when it receives the command/data.

    The entire webpage need not be in flash, because javascript can interact with flash, so you can just use a small flash widget to serve as the communication layer, and keep everything else html/css/js. But now you need to write a socket server...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •