The setting of "domain names" on the pages is imposed by the browsers, any time you need to allow pages coming from different hosts to see each other.
See
http://en.wikipedia.org/wiki/Same_origin_policy, for instance.
Lightstreamer must cope with this limitation, because production front-ends based on Lightstreamer take pages from both a web server and Lightstreamer Server
and the Web Client Library just wraps the domain name setting through the "setDomain" method.
The general rule is that you must supply to "setDomain" a domain name such that both the web server host name and Lightstreamer Server host name are compatible with the chosen domain name, where:
- The web server host name is the one contained in the url by which you recall the pages.
- Lightstreamer Server host name is the name you supply to "setLSHost".
Obviously, if no domain name ensures compatibility with the required web server and Lightstreamer Server host names, then the front-end can't push.
The compatibility rules depend on the browsers.
I have no link to the complete rule; I hope someone who has could contribute. The most common case is that the xxx.yyy.zzz host name is compatible with the yyy.zzz domain name, but many special cases are also covered.
The web client library performs a preliminary check on the names supplied.
In your case, if you used a domain name and a LSHost which are consistent (as in the example by Simone), you might incur in an inconsistency between the domain name and the web server host name you used to recall your page from the browser.
There are no different rules for production and development environments.
However, there are cases that are not suitable for production but may be adopted for development if development environment limitations leave them as the only possible resort.
For instance in your development environment, the web server, Lightstreamer Server and test browser may all be on the same PC and no name of the form xxx.yyy.zzz may be available to access it, but only "localhost".
In this case, we suggest that you play with your "hosts" file in order to set dummy names for your PC;
but it turned out that you might also use "localhost" as LSHost and also recall the pages from "localhost", provided that you
either issue setDomain(null) and see the pages on an IE browser,
or issue setDomain("localhost") and see the pages on a FF browser.