Description
XHTML live Chat based on the XMLHttpRequest Object (ajax)
Please consider this a proof of concept rather then a tested real world solution. I am happy for anybody to contribute and develop this further.
You can comment at plasticshore.com at the original posting or contact me directly. The sources are available for download here.
Known issues
Works in latest IE(win), Firefox and Safari. IE does not support the png image format. Safari does not always clear the form and has problems with special characters. Omniweb is currently read only.
Older/other Browsers might not like it at all and I have not build in any means to catch those (or have this chat degrade gracefully).
As a chat it would be more intuitive if the layout was following the usual chat scheme: input at the bottom, history moving upwards.
The server-side script (which I did not publish for security reasons) could be improved.
The frequent update cycles should be intelligent (i.e. slow down if nothing has changed or switch into a pause mode)
Where do we go from here?
Apart from this being a chat I can think of some more (even more useful?) applications:
- An advanced comment function for blogs offering immediate communication between users.
- An advanced shoutbox.
- A live single/multi-user publishing system.
- A XHTML Broadcasting tool for live coverage of events.
All of these could degrade gracefully if javascript is not available!
Credits
I have used the following resources:
- Guide to Using XMLHttpRequest (with Baby Steps)
Providing all you need to know about XMLHttpRequest. - Unobtrusive Javascript
Got me started on the whole javascript thing. - Hosting (and so much more) is provided by schoene neue kinder
Creative Commons License
This web site (including XHTML, CSS, Javascript, PHP, all images), unless otherwise noted, is licensed under a Creative Commons License.
valid XHTML
chat output
- Lavendise Faery chat:welcome