Browsers, cache servers, and content delivery networks can serve static files without contacting the application. That saves requests, but a deployment can leave clients using old JavaScript or images alongside newly generated pages. Cache busting changes a resource’s URL when its file changes, so caches can retain unchanged files without serving stale versions indefinitely. section 26.4.1
Version a JavaScript file
In Views/Shared/_SimpleLayout.cshtml, add asp-append-version="true" to the script element: <script asp-src-include="/lib/jquery/**/*.min.js" asp-src-exclude="**.slim.**" asp-append-version="true"></script> The rendered element includes a version query string, such as <script src="/lib/jquery/jquery.min.js?v=_xUj3OJU5yExlq6GSYGSHk7tPXikyn"></script>. The include and exclude attributes choose the file; asp-append-version enables cache busting. section 26.4.1
Version an image
The ImageTagHelper applies the same attribute to an image in the shared layout: <img src="/images/city.png" asp-append-version="true" class="m-2" />. Request http://localhost:5000/home/list and inspect the HTML response. The image URL includes a version checksum, such as /images/city.png?v=KaMNDSZFAJufRcRDpKh0K_IIPNc7E; changes to the file can therefore pass through caches instead of returning the stale image. section 26.5

