One workaround is to make sure that all links the CGI program generates to itself contain a unique, random piece of information which is then ignored by the program when it arrives as part of the PATH_INFO environment variable. But this is not ideal, since the user will still see the same output again upon returning to a bookmark.
However, consider the following alternatives:
Some browsers support the Pragma: no-cache header. In this case, the following output at the beginning of your CGI program will specify both the content type and the fact that the page should never be cached:
Content-type: image/html Pragma: no-cacheNote the two carriage returns at the end, always required before the beginning of the actual document.
Alternatively, if the page is "good" for some fixed amount of time, the "Expired:" HTTP header can be used to specify the time after which the page must be fetched again. Important: The Greenwich Mean Time (GMT) must be specified, not the local time.