Code: No caching headers

Chapter 8 - Ajax Optimization

You can easily keep the browser from caching requests by emitting headers on the server. In PHP, you would use statements such as these:

header("Cache-Control: no-cache");
header("Pragma: no-cache");

There are many choices, and servers can be quite loquacious in the kinds of headers they stamp on a response to avoid caching. For example, you might set some headers to really let caches know that you mean business:

Expires: Wed, 18 Nov 1981 09:12:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache