next up previous
Next: Access Permission Checking Up: Cache Applet Examples Previous: Logging User Accesses

Advertising Banner Rotation

  Another reason that servers disable caching is to change the presentation of the document upon every request, for example, putting on different advertising banners. This again conflicts with proxy caching. Active Cache solves the problem by attaching an ad-banner-rotation applet with each document.

The applet, when invoked, first checks for the object that specifies the banners, their positions in the document, and their frequencies of appearance. If the object is not in cache, it sends a request to the Web server to fetch the object. The applet then goes through the cached document, and for every image that is specially marked to be an advertisement banner, decides which banner should be put there according to the specifications, and changes the image URL. It then puts the new document in the New_File and returns 1.

The applet implements a simple frequency-based rotation. Other algorithms can be implemented. The applet can record the state needed by the algorithms in the object. It can further record in the log object the banner choices that it has made.



Pei Cao
7/22/1998