So I have started a project, where I want to make an online ajax chat, but I do NOT want to use jQuery JSON, COMET and so on. I am looking for pure javascript, no libraries no framework.
Good news is that I have already made the chat and it is working fine. Why do i make this post? Because I simply cannot find any pure javascript solution for long-polling. Currently I am using the setInterval method to "ask" the database to send whatever is in the database. now, how do I execute my ajax request whenever I get a response? (Long-polling).
please bear in mind that I am not looking for a jQuery solution or what have you.. I am using pure JavaScript and PHP. No framework or library.
Thanks in advance.