Consultor Eletrônico



Kbase P95588: How to prevent proxy from caching the WebSpeed generated HTML page
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/4/2004
Status: Unverified

GOAL:

How to prevent proxy from caching the WebSpeed generated HTML page

GOAL:

What to do to prevent cached WebSpeed generated page to display in browser

GOAL:

How to code WebSpeed procedures to avoid caching on proxy servers

FIX:


There are basically several places on the way from the WebSpeed/Web Server
to the client's browser where the page could be cached.
The most common example is having the proxy server, or some kind of gateway
that can cache the served HTML pages on their way to the client's browser.
Finally, the browser itself can render the cached page instead going to the
web site to fetch the actual page content.
The basic means of controlling the caches is usage of the 'Cache-Control' and 'Expires'
HTTP headers. Another way is using the META HTTP-EQUIV tags embedded in the HTML page,
but that is not recommended as some browsers do not entirely support them.
An example for the WebSpeed cgi wrapper object is to modify the
'outputHeader' internal procedure where you add:
output-http-header("Cache-Control","No-Cache").
output-http-header("Pragma","No-Cache" ).
output-http-header("Expires","0" ).
output-content-type("text/html":U).
For the SpeedScript this is achieved by modifying the existing files
and adding the following statements:
<SCRIPT LANGUAGE="SpeedScript">
PROCEDURE output-headers:
output-http-header("Cache-Control","No-Cache").
output-http-header("Pragma","no-cache" ).
output-http-header("Expires","0" ).
END.
</SCRIPT>
It does not matter where is this added, but the most appropriate place
would be the end of the existing SpeedScript file.