Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Script & Link tag helpers should support generating cache-busting file version hash in URL #2141

@DamianEdwards

Description

@DamianEdwards

The ScriptTagHelper and LinkTagHelper should support an option that enables the generation of a file version hash of the linked file contents placed in the URL for the purposes of busting client-side cache. The hash should be placed in the query-string (key v). The helpers should render the hash by default.

This feature existed in System.Web.Optimization so there might be some code we can use from there.

Example

<link src="~/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" asp-file-version="true" />
<script src="~/lib/jquery/jquery.min.js" asp-file-version="true"></script>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions