Index  Up  <<  >>  


How MiniVend Manages Sessions

Normally, each request for a World Wide Web page which comes in to a server stands on its own. While the server will probably know which machine a request comes from, it may not know if the next request comes from the same browser or even from the same user on that machine.

MiniVend keeps track of who is ordering what by including in the URL a session id, which is a random piece of text which is different for each customer browsing the catalog.

This session ID is either tracked with cookies, or it can be passed along through special URLs within catalog pages. Pages in the catalog served by MiniVend running as a cgi-bin program generate a special URL for every link. Here is an example of such a URL:

    http://machine.company.com/cgi-bin/simple/browse?WehUkATn;arg;1

An explanation of each part:

machine.company.com
Internet address of the server hosting the MiniVend catalog.

cgi-bin
Informs server that the requested page will be generated by a program.

simple
Name of the program to run

browse
Page of the catalog to display

WehUkATn
The session ID

;
Separates session ID from argument.

arg
An argument which can be used by MiniVend to select page display options.

;
Separates argument from the unique integer.

  • A unique integer (or source code, if it contains a letter) which prevents caching servers from caching the URL.


  • Index  Up  <<  >>