I\'ve recently returned to a web site project that has been on the backburner. Since recommencing work I\'ve noticed css and javascript changes aren\'t being recognised by
If you always want to get the last version of js and CSS files, you could modify your StaticFile middleware like
app.UseStaticFiles(new StaticFileOptions()
{
OnPrepareResponse = context =>
{
context.Context.Response.Headers.Add("Cache-Control", "no-cache, no-store");
context.Context.Response.Headers.Add("Expires", "-1");
}
});
or you could add asp-append-version="true" to your file references like: