There comes a time in an ASP.Net developer's life when he must write own HTTP handler. Quite often the handler has to return a static or a rarely changable content and the developer should implement caching of it. Step 1. Specify how long data should retain cached. Someone does it this way: context.Response.Cache.SetExpires(DateTime.Now.AddDay(1)); Someone likes this approach: context.Response.Cache.SetMaxAge(86400); //1 day in seconds The most careful developers use both: context.Response.Cache.SetExpires(DateTime.Now.AddDay(1)); context.Response.Cache.SetMaxAge(86400); All the above are correct in their own way. The first example sets an absolute expiration date. In the list of headers it looks like this: Expires: Mon, 25 Jul 2016 19:50:09 GMT This header was introduced in the HTTP/1.0 specification but it is supported by HTTP/1.1 too. A small pitfall related to this header is that the expiration date and time are set explicitly and it may cause issues ...