WebSuspendCache Function

Action

This function is used to disable the browser cache or (if the option parameter is provided) influence its behavior.

Include file

WebAPI.bdh

Syntax

WebSuspendCache( in nOption : number optional );

Return value

  • none

Parameter Description
nOption

If this parameter is omitted the cache will be disabled (no cache hits at all). If it is provided it can be one of the following values:

WEB_CACHE_NO_FULL_HIT
Documents, that would normally be a full cache hit (no request to the server) will be requested conditionally (if-modified-since header)
WEB_CACHE_FULL_HIT_ONLY_IN_PAGE
Identical with the WEB_CACHE_NO_FULL_HIT option with the exception, that duplicate embedded objects in a page are requested just once (what normally a browser does)

Example

dcltrans
  transaction TMain
  begin
    WebSuspendCache();
    WebPageUrl("http://lab3/shopit/", "ShopIt - Greetings");
    WebSuspendCache(WEB_CACHE_FULL_HIT_ONLY_IN_PAGE);
    WebPageUrl("http://lab3/", "homepage");
    WebResumeCache();
  end TMain;