Note that you can still add <meta> tags to your HTML pages for every page you don't want to cache:
<meta http-equiv="cache-control" content="no-cache" />
, IIS wwwroot ( , project.json), web.config ( IIS).
, Configure() Startup:
public void Configure(IApplicationBuilder application)
{
application.Use(async (context, next) =>
{
context.Response.Headers.Append("Cache-Control", "no-cache");
await next();
});
}
, HTTP- , PathString HttpRequest (Request HttpContext), ( , ), :
application.UseStaticFiles(new StaticFileOptions
{
OnPrepareResponse = context =>
{
context.Response.Headers.Append("Cache-Control", "no-cache");
}
};
, , , , - .