Tag Helpers for <img> <img src=”~/FilePath” asp-append-version=”true” /> <img src=”/FilePath?v=HashOfImageFile” />
asp-append-version Generates SHA512 hash of the image file as query string parameter appended to the file path. It REGENERATES a new hash every time when the file is changed on the server. If the same file is requested multiple times, file hash will NOT be regenerated.
Tag Helpers for <script> <script src=”CDNUrl” asp-fallback-src=”~/LocalUrl” asp-fallback-test=”object”> </script> <script src=”CDNUrl”> </script> <script> object || document.write(“<script src=’/LocalUrl’></script>”); </script>
asp-fallback-src It makes a request to the specified CDNUrl at the “src” attribute. It checks the value of the specified object at the “asp-fallback-test” tag helper. If its value is null or undefined (means, the script file at CDNUrl is not loaded), then it makes another request to the LocalUrl through another script tag.