The ETag HTTP response header is an identifier for a specific version of a resource. It allows caches to be more efficient, and saves bandwidth, as a web server does not need to send a full response if the content has not changed.
The following code shows how to enable the Response ETag Middleware
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddResponseETag();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseResponseETag();
}
}