Multiple Servers

In theory, it doesn't matter whether serverFrames send requests to different WebServers by their "setServerURL()" methods. In practice there is a catch. A serverFrame can send a request to any WebServer and receive back the results in a target serverFrame, or display it in a window. However, the contents of the target serverFrame can not be read if they have been filled from another server, in other words, if the MapServer CGI and the MapClient web page are on different physical servers.

This is an important and fundamental security issue: the . No JavaScript application should be able to read the contents of any other window than those coming from the same server. Imagine that you use MapClient in one browser window, and are doing banking business in another. A malevolent MapClient application should never be able to get outside its own domain. This is an important issue in the development of the concept, and it will take some time before all its ramifications have been explored. In the meantime, there are two ways in which maps from different servers can be combined:

1) Use mode=map and target the serverFrame directly to an image (see section 4.2). This is equivalent to OpenGIS WMS methods, only MapServer offers many more possibilities to produce map layers.

2) Use document.domain to group many servers under the same security limits. In my case, I have been working on the at . This cluster has 40 nodes, named "e1.yellow.sara.nl" to "e40.yellow.sara.nl". By setting the global variable document.domain to "yellow.sara.nl", scripts from all nodes below that domain can read each other's pages.

An important development issue of MapClient will be the exploration of while combining maps and data from different servers, e.g. , , and , This is still unexplored terrain, but it is fundamental to the further development of WebMapping. Note that no development for IE will take place in this direction.