src/packages/EmbedIO/HttpResponseExtensions.cs
/// <summary>
/// Sets the necessary headers to disable caching of a response on the client side.
/// </summary>
/// <param name="this">The <see cref="IHttpResponse"/> interface on which this method is called.</param>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
Sets the necessary headers to disable caching of a response on the client side.
Sets the necessary headers to disable caching of a response on the client side .
public static void DisableCaching(this IHttpResponse @this)
        {
            var headers = @this.Headers;
            headers.Set(HttpHeaderNames.Expires, "Sat, 26 Jul 1997 05:00:00 GMT");
            headers.Set(HttpHeaderNames.LastModified, HttpDate.Format(DateTime.UtcNow));
            headers.Set(HttpHeaderNames.CacheControl, "no-store, no-cache, must-revalidate");
            headers.Add(HttpHeaderNames.Pragma, "no-cache");
        }
public static void DisableCaching ( this IHttpResponse @this ) { var headers = @this . Headers ; headers . Set ( HttpHeaderNames . Expires , " " ) ; headers . Set ( HttpHeaderNames . LastModified , HttpDate . Format ( DateTime . UtcNow ) ) ; headers . Set ( HttpHeaderNames . CacheControl , " " ) ; headers . Add ( HttpHeaderNames . Pragma , " " ) ; }
Sets the necessary headers to disable caching of a response on the client side.
Sets the necessary headers to disable caching of a response on the client side .
None
IHttpResponse
this
this
The  interface on which this method is called.
The interface on which this method is called .