<!DOCTYPE html>
<html lang="en">
<head>
<title>Server-sent event testing thingy</title>
<style type="text/css">
* { padding: 0; margin: 0; border: 0; }
html, body, #body { width: 100%; height: 100%; }
</style>
<script type="text/javascript">
onload = function () {
var dest = document.querySelector("div");
var source = new EventSource('/lab/perl/sse.pl');
source.onmessage = e => dest.innerHTML = e.data;
}
</script>
</head>
<body>
<div id="body"></div>
</body>
</html>