Re: Server-side image maps

At 12:51 PM -0500 2001/10/27, Jim Thatcher wrote:
>And if I simulate w click by submitting
>http://www.metrokc.gov/wwwnav.map?142,5
>by just opening it in my browser, indeed the News site is opened. Why? What
>is special about the .map file on the King county server that it knows to
>open a page depending on whether the coordinates are in corresponding
>ranges.

If this is too generic of background information, then please consider
that I'm writing to the whole list and a general audience. :)

Originally when image maps were created, they were all server-side and
were handled by a CGI script (usually written in compiled C) that
would translate the coordinates sent by the browser into a redirect
script.  The scripts were generic, and each one referred to a
different map file on the server, which was given the URL request.

E.g. something like

http://kynn.com/cgi-bin/imagemap/wwwnav

As servers got slightly more complex, the functionality to parse a map
file was directly included into the server code rather than in an
external CGI script.  This was done by designing a "handler" for
certain types of file requests -- such as "all .map" files or
whatnot.  This is also how ".shtml" files are handled (with server
side includes) and whatnot -- the web server knows how to convert
that file into something that can be used.

If a server is set up this way, then just a reference to the ".map"
file is all that's necessary, with no need for a CGI script.  It also
means that in some cases, such as the one here, you can directly
view the contents of the ".map" file.  (However, in many cases this
is not the case.)

>I can figure no reason for this to be a server side map, but if what I find
>here is generally used, there is even less reason since the data for a
>client side map exist in the .map file on the server.

You're correct.  There's no reason for this to be a server-side map,
and they really should recode it to client side.  The most common
reason why this is not done is out of a misguided notion of
"backwards compatibility."

--Kynn

-- 
Kynn Bartlett <kynn@reef.com>
Technical Developer Liaison
Reef North America
Accessibility - W3C - Integrator Network
________________________________________
BUSINESS IS DYNAMIC. TAKE CONTROL.
________________________________________
http://www.reef.com

Received on Saturday, 27 October 2001 14:18:26 UTC