I am developing a simple chat application for learning purposes. I am using long-polling to keep my chat updated. Now this is what I am doing-:
Is this the best way to do it ? Is there anything more optimized than this ? Should I consider HTTP Streaming to HTTP Long Polling since it reduces overhead ?
I am using Java Servlets to do this but this more of an AJAX question, so thats why I didn't add any code. I will if that's required.
What you have suggested would certainly work. Another options is WebSockets, though it is relatively new technology and it is not supported in older browsers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.