Search code examples
phpjquerycomet

dose JQuery is fastest way to listen to mysql for new record or load new content with clicking?


1- I've developed a web-based support messaging system for my users.(not chat - something like facebook messsage system). the system listen to mysql every 10 second for check new message.

do you think I must use JQuery or Comet or anything else?

2- also I want load more content automaticly(with click on a button or scrolling to end of page). Dose JQuery is only fast method to do that?

this a sample website that I developed it: wepars

It loads more content automaticly with JQuery but sometimes auto load content do not works well. I think it is too slow when I compare with some other website!


Ofcoure I heard about nodejs but I think it is too complex for programming and also it is for reatime chat so I do not need that for this type of project. what do you think? Am I right?

I work with php.


Solution

  • jQuery is simple and stable for things like that. If you want to make your script faster, you may use pure JavaScript, XMLHttpRequest is your solution.

    And I think you mixed meanings of server and client side technologies in your question.