In the usual deployment scenario, Lightstreamer Server and the Web Server are deployed on different hosts
(or, at least, they are accessed by the clients through different hostnames, as push.mycompany.com and www.mycompany.com)
and the pages coming from the two servers can interoperate thanks to the domain setting, which can refer to a common superdomain (as mycompany.com).

Let's suppose, on the other hand, that Lightstreamer Server and the Web Server are deployed on the same host, listening on different ports,
(or, at least, that they are accessed by the clients through the same hostname, as www.mycompany.com).
Note that this is not recommended as a production configuration, because only port 80 (or 443 for https) is ensured to be reached by any client browser.
Nevertheless, the pages from the two servers can still interoperate thanks to the domain setting, provided that you can enlarge it to be a superdomain (as mycompany.com).

In some test environments, you may only have a hostname that doesn't allow a legal superdomain (as localhost) and you may wish to try to have your page still interoperate.
This is possible, but strongly browser dependent.
Sticking to the most common cases:
  • On Internet Explorer, the domain should be left at its default; in terms of Lightstreamer javascript APIs, you can also issue setDomain(null)
  • On Firefox, the domain should be explicitly set to be the same as the hostname (as in setDomain("localhost")).


Because of this browser-dependent behavior, the recommended way of testing when Lightstreamer Server and the Web Server are on the same host and no suitable hostname is available is to assign fake hostnames of the correct format directly on the client machine, by playing on the "hosts" file.

Another consequence is that you can't use hostnames like mycompany.com for the Web Server and push.mycompany.com for Lightstreamer Server, because using mycompany.com as the common superdomain is not supported by all browsers. Hence, this case is officially not supported by the Web client APIs.