Snip
|
The EventSource enabler allows you to use the upcoming E...
|
---|
Categories |
|
---|
For Snip |
loading snip actions ... |
---|---|
For Page |
loading url actions ... |
The EventSource enabler allows you to use the upcoming Event Source API in any current web browser. Simply include the enabler library in your page, and you are able to use the API. When user agents implement the Event Source API themselves, your application will immediately and transparently start using the native implementation.
The Event Source API allows you to generate JavaScript events on your web server, and have them fired in a client web browser. It greatly simplifies the process of periodic updates from a remote web server, through a combination of HTTP polling and streaming.
To use the EventSource enabler, simply include the enabler javascript as follows:
<script type="text/javascript" src="http://eventsource.labs.ericsson.net/ESProxy/library/?key=YOUR_API_KEY"></script>
You're ready to go! Just use the Event Source API to receive your server's events. You can also take a look at our examples.
HTML |
<p>The EventSource enabler allows you to use the upcoming <a class="ext" href="http://www.w3.org/TR/eventsource/">Event Source API</a><span class="ext"></span> in any current web browser. Simply include the enabler library in your page, and you are able to use the API. When user agents implement the Event Source API themselves, your application will immediately and transparently start using the native implementation.</p> <p>The Event Source API allows you to generate JavaScript events on your web server, and have them fired in a client web browser. It greatly simplifies the process of periodic updates from a remote web server, through a combination of HTTP polling and streaming.</p> <p>To use the EventSource enabler, simply include the enabler javascript as follows:</p> <p><span class="geshifilter"><code class="geshifilter-html4strict"><span style="color: rgb(0, 153, 0);"><<span style="color: rgb(0, 0, 0); font-weight: bold;">script</span> <span style="color: rgb(0, 0, 102);">type</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"text/javascript"</span> <span style="color: rgb(0, 0, 102);">src</span><span style="color: rgb(102, 204, 102);">=</span><span style="color: rgb(255, 0, 0);">"http://eventsource.labs.ericsson.net/ESProxy/library/?key=YOUR_API_KEY"</span>><<span style="color: rgb(102, 204, 102);">/</span><span style="color: rgb(0, 0, 0); font-weight: bold;">script</span>></span></code></span></p> <p>You're ready to go! Just use the <a class="ext" href="http://www.w3.org/TR/eventsource/">Event Source API</a><span class="ext"></span> to receive your server's events. You can also take a look at our examples.</p> |
---|