Start digging into the API from the LightstreamerClient object.
When running in a browser window some limitation may apply:
- On the current version of Opera and on older versions of other browsers (IE<=7, FX<=3) both Ligthtstreamer server and the Web Server which supplies the front-end pages
must share a common domain for the streaming to work; so, as an example, if the web server is www.mycompany.com and the Lightstreamer server is push.mycompany.com the following code is needed:
Note that, as a consequence, you may need to set the document.domain in other front-end pages too, in order to allow them to interoperate with pages that have their document.domain set.
Further details and special cases can be found in the "Additional notes" section of the "Lightstreamer JS Client - Deployment Config Matrix" document.
- On the current version of Opera and on older versions of other browsers (IE<=7, FX<=2)
href="#" onClick="myStuff(); return false;"syntax should be used, instead.
Note the final "return false;" statement, which prevents the execution of the default event handler. If missing, the browser may change the displayed address by adding "/#"; some browsers (e.g. Firefox) may even add a spurious entry in the history list.
Anyway remember that you can also associate onclick events to elements other than "A" avoiding the problem altogether.
- Some browsers are permitted to open a limited number of concurrent HTTP connections per server.
If the front-end is composed by different html pages (or one single html page using different
LightstreamerClientinstances), each one with the need to get data from the same Lightstreamer server, you may want them to share the same connection to avoid saturating the connection pool. You can leverage the
connectionSharingproperty of your
LightstreamerClientinstance to make various
LightstreamerClientshare the connection.
- On IE6 if a page contains a
LightstreamerClientinstance, then it cannot be used as a link target or referred to in a "window.open" command, because, even in case the link is meant to preserve the page (i.e. to access it without replacing it, as in "myPage.html#position") this may stop the streaming connection.
- Other common issues can find a solution on our public forum.
The library can also be used inside a Web Worker (excluding on Opera) and inside a Node.js instance.
The library generator highlights which class can or can't be used on such environments.
Check out the related example and associated README to learn more.