# JavaScript 'Listening' for Server Events

**URL:** <https://forum.kirupa.com/t/javascript-listening-for-server-events/218538>\
**Category:** web dev\
**Created:** [March 8, 2007, 4:36pm UTC](https://forum.kirupa.com/t/javascript-listening-for-server-events/218538 "2007-03-08T16:36:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsadan](https://avatars.discourse-cdn.com/v4/letter/h/7bcc69/32.png) [@hsadan](https://forum.kirupa.com/u/hsadan)\
**Post date:** [March 8, 2007, 4:36pm UTC](https://forum.kirupa.com/t/javascript-listening-for-server-events/218538/1 "2007-03-08T16:36:22Z")

</div>

Is it possible to have a JavaScript event triggered based on a server event?

for example, let’s say I’m trying to create a chat application -  
would the client-side have to constantly send a request to check for new messages, or would the server be able to send an instruction saying that a new message has arrived?
