0

I'm building web chat application using Code Igniter. In this chat app, there is only one channel / room. I'd like to know what's the best practice to store data whether using database or file in order to save bandwith and page load.

p.s : I use javascript setInterval to load chat div every x seconds.

Fahmi Ramadhan
  • 287
  • 2
  • 4
  • 11

1 Answers1

0

if you want the file you could use reverse-ajax/comet for it is faster and take lesser bandwidth cause it uses long pooling

if you use database and use ajax it is slower because it always updates for new chat message in your database get it from there take the rows and displays it which takes time and I think more bandwidth

rodolfo navalon
  • 183
  • 1
  • 1
  • 13
  • long polling examples http://stackoverflow.com/questions/333664/simple-long-polling-example-code – Philip Apr 13 '13 at 05:09