Permalink
Browse files

minor changes to server-sent events

Change yaws_sse to send close connection header by default, and change the
example to return an Allow header if anything other than GET is requested.
  • Loading branch information...
1 parent 6561513 commit 694859075e80c2fc8818c150f5c2b5586e3e137e @vinoski vinoski committed Jun 29, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 www/server_sent_events.html
@@ -5,7 +5,8 @@
<script type="text/javascript">
var es = new EventSource('/sse');
es.onmessage = function(event) {
- document.querySelector('#date-time').innerHTML = event.data;
+ var h2 = document.querySelector('#date-time');
+ h2.innerHTML = event.data;
}
</script>
</head>

0 comments on commit 6948590

Please sign in to comment.