If your webpages makes use of advertisements, you want to ensure that the most ads are displayed to your users. However, if users use the back button on their browser to navigate back on your site, chances are they won’t see a new ad on reloading an old page. You can overwrite these default settings by using one line of HTML code which will tell a user’s browser not to cache your page(s), thereby forcing them to reload the page again including viewing a new ad. Typically this tip should increase your advertising impressions by at least 15% if not greater, but be advised that a larger amount of bandwidth and resources will also be used to re-display the same webpages to web surfers. If your concerned about bandwidth conservation, do not apply the suggestions we make on this page.

HTML No-Cache Syntax

The cache setting can be controlled via three sets of META tags, “Expires”, “Pragma” and “Cache-Control”. Each of these META Tags will perform the same net effect and cause the web page to not be cached. The difference between each of them lies in the differences between how browsers interpret the results.

The “Expires” tag is an all browser tag which we recommend the most because it functions in all browsers and explicitly indicates to browsers that the page is to expire immediately and should therefore be reloaded now. In addition, webmasters have explicit control of defining exactly when a page will expire, whether it be now, in a few minutes or in a few months, this META Tag explicitly allows a set date for expiration. (Learn more about the Expires META Tag)

The “Pragma” tag only functions in Netscape browsers and for this reason we do not recommend its use since you essentially limit the ability to prevent caching to only Netscape users. The Pragma tag was specifically designed to interact with proxy servers that cache web sites into their local databases. It’s only option is to set the cache off if the tag is found, otherwise (if it is not found) it assumes that proxy caching is acceptable.

The “Cache-Control” tag specifies desired behaviour from a caching system and is understood by both clients and web servers. In order to prevent caching, the Cache-Control option should be set to “no-cache”. Our preference however still lies with the “Expires” tag simply because webmasters have more control and options of defining when a document will cease to be valid.

Sample Usage to Prevent Caching

Notice About These Implementations:
These cache prevention techniques override browsers’ cache settings which also means that each request will need to be re-issued which will cause an increase in bandwidth requirements. If your concerned about keeping bandwidth to a minimum, consider not using the techniques we cover on this page.

META Tag: “Expires”
General Usage: <META http-equiv=”Expires” content=”0″>
Benefit: Tells browsers that the document expires now and should force a reload of the document.
More Info: Learn more about the Expires Meta tag in our META tag guide which covers all the functionality of this META Tag including how to set expiration dates.
META Tag: “Pragma”
General Usage: <META http-equiv=”Pragma” content=”no-cache”>
Benefit: Prevents Netscape browsers from caching your webpages, thereby forcing webpages to be reloaded entirely including advertisements.
Comments: The Pragma META Tag is only understood by Netscape browsers, Internet Explorer will simply skip over this tag and not understand it.
META Tag: “Cache-Control”
General Usage: <META http-equiv=”Cache-Control” content=”no-cache”>
Benefit: Tells browsers that the page should not be cached and should always request and return the newest copy from the server.

Reference: Submit Corner