Cache busters

This article describes why macros like ${timestamp} and ${random} are used and how they work.

What are cache busters?

Cache busters are methods to stop browsers from caching tracking URLs. They are an important and necessary part of the Pulse ad serving workflow. The cache buster is often a random number attached at the end of a URL. Pulse offers macros that can automatically add this random number to all requests sent from our backend.

About ad requests

The Pulse ad server delivers ads to the right place and at the right time according to a set of rules. To be able to make a decision to deliver an ad, Pulse needs to receive an ad request. This request is sent from your player at the site (mobile, PC, tablet, ...) where you want ads to be delivered, and results in Pulse responding with an ad, according to the bookings and rules you have previously set up in Pulse.

Besides sending the ad itself, it also sends a variety of tracking links, click links, impression links, quartile links, and so on. Your ad player then automatically “clicks” at these links without the viewer ever noticing anything. This results in the ad server (or your third-party supplier of the tracking URL) registering an impression and other miscellaneous data, which it then presents through Pulse. These links are unique for every booked ad, and can therefore be used to gather statistics regarding impressions and so on. This information is then used for reporting or showing statistics on the dashboard.

Sometimes there are obstacles for the requests going back and forth between your ad player and the Pulse ad server. Ad blockers are one source of failure for these ad requests.

Using macros for cache busting

A problem that we actually can solve is browser caching. Browser caching is a function built into all browsers. It keeps a small copy of the latest used links, images, javascripts, which the user has loaded during their surfing, on the local hard drive on the user's computer. The reason for this is really in the best interest of the user. By loading stuff that is often used, directly from the hard drive, the user can load pages much faster and gets a better experience surfing the web.

However, this behavior results in your ad request also getting cached. This means that instead of reloading a unique tracking link that is used to count a new impression, we get an old saved link from the hard drive. This messes up the counted statistics in Pulse because the link is not unique.

To solve this, we introduce the concept of a cache buster. The trick is to add a unique number to the link. That way the browser never has an old version of a link that matches the new one and therefore does not use a cached link.

This unique number can be a random sequence of figures or a detailed time stamp from our ad server that is always unique. To add these cache busting numbers dynamically to the trackers, we have the macros ${timestamp} and ${random}. When the ad player calls for an ad and the tracker links, the ${random} part of the booked tracking URL is replaced by a random number in Pulse.


The booked tracker${random} becomes when it reaches the ad player, and the browser does not load a cached version as the link is unique.

In short, the macros make the tracking links unique to avoid browser caching and resulting problems with statistics.