Cachebusting in Online Media – what is it?

This was an eye opening document for me, explaining how ‘cachebusting’ works in terms of online advertising, and why we have to do it.

Questions after reading?  Email or IM me – would love to chat.


In an attempt to speed up user experience around the web, most browsers implement a technology called cache. This mechanism allows information, such as web pages, images, etc., to be saved on a user’s computer. Therefore, if the user calls for a previously requested web page, the browser will recall the information from the cache and not make another request from the site itself. Once the browser receives a DoubleClick ad image, it will store the image in the cache. Further calls for the ad image will be drawn from the cache – not from DoubleClick — and an impression will not be counted. In order to defect the browser cache mechanism, Cache busting (aka Random Number Generation (RNG)) is implemented.

Image Tags

For advertisers using DART for Advertisers (DFA), ad images and clickthrough URLs are stored on DoubleClick servers. These images and URLs can be called by image redirect tags that are implemented in ad slots on web sites. The image tags are sent from the web sites to users’ browsers in lieu of images and clickthrough URLs. When these image tags are processed by the browser, a request is made to the DoubleClick servers to retrieve the ad image and clickthrough URL, which are then returned to the browser. When an ad image is sent, DFA records an impression; when a click is processed, DFA records a click. If the ad image is retrieved from cache and not from the DoubleClick servers, the impression will not be recorded. This can happen if cache busting (RNG) is not utilized.

Cache Busting with a Random Number (RNG):

Browser caching can be defeated by dynamically creating unique tags for each ad image served. This ensures that when a user navigates from page to page the ad image is not delivered from the browser’s cache, but rather a new image is delivered from the DoubleClick servers for each request. To accomplish this unique tagging, a different random number is added to the image tags that reference the ad image. Typically, when a browser sees another image call with the same name, it pulls the ad from cache. To defeat this, an ord= attribute is added to the HTML tag, and when implemented correctly, prevents the images from being pulled from the cache. Tags with different “ord=” values prevent this caching problem because the different value forces the browser to retrieve a new banner from the ad server. If not implemented correctly, though, browser caching will not be defeated.

DART Tags and RNG

DART tags generally come in two forms: Standard Image Tags and IFrame/JavaScript tags. Both contain multiple instances of an attribute for cache busting: ord=[timestamp]?.  Here is an example of a Standard Image Tag:

<A HREF=”;sz=468×60;ord=[timestamp]?”>

<IMG SRC=”;sz=468×60;ord=[timestamp]?” BORDER=0 WIDTH=468 HEIGHT=60 ALT=”Click Here!”> Click Here!</A>

Random Number Example

Once the [timestamp] value has been replaced with generating code by the web site, the tags are sent to the user’s browser. Let’s assume the code generates the random number 86753091. The resulting HTML tags would look like this:

<A HREF=”;sz=468×60;ord=86753091?”>

<IMG SRC=”;sz=468×60;ord=86753091?” BORDER=0 WIDTH=468 HEIGHT=60 ALT=”Click Here!”> Click Here!</A>

Upon receiving these tags, the browser would retrieve an ad image from the DoubleClick servers, DoubleClick would count an impression, and the resulting ad image call would be stored in the cache. The next time these same tags were sent to the same browser, a DIFFERENT and RANDOM number should be generated. If the second set of tags sent to the browser generated the random number 13457890, the resulting tag would look like this:

<A HREF=”;sz=468×60;ord=13457890?”>

<IMG SRC=”;sz=468×60;ord=13457890?” BORDER=0 WIDTH=468 HEIGHT=60 ALT=”Click Here!”> Click Here!</A>

The browser will not attempt to retrieve the ad image with the ord=13457890? attribute from the cache because it interprets the tag as a reference to a different ad image. This causes the browser to call the DART ad servers; consequently, a second impression is counted.  If the same ord= value had been used for both sets of tags, the browser would have retrieved the second ad image from the cache and the second request would not have been recorded by DART.  If the ord= is implemented correctly in image tags, DoubleClick will count an impression for each request from a browser. If the cache busting string (RNG) is NOT implemented in image tags, DoubleClick will undercount the number of ad impressions as reported in the Advertiser’s/Client’s view.

Also – if anyone knows how this document originated, please let me know so that I can link and credit.