The Gene Sorter is a CGI script. When the user points her web
browser to the Gene Sorter's URL (http://genome.ucsc.edu/cgi-bin/hgNear), the web server
runs the script and sends the output over the network. The script's
output is an HTML form. When the user hits a button on the form, the web
browser sends a URL to the web server that includes the values in the
drop-down menus and other controls encoded as a series of
variable=value pairs. The web server runs the
script once more, passing the
pairs as input. The script then generates a new HTML form in
CGI scripts can be written in any language. The Gene Sorter script is actually a moderately large program written in C.
The lifetime of a CGI script is very limited. It starts in response to the user clicking on something and finishes when it generates a web page. As ...