{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/2666","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/2666/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/2666/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/2666/events","html_url":"https://github.com/aspnet/Mvc/issues/2666","id":86149636,"number":2666,"title":"AppendVersion FileVersionProvider querystring alternatives","user":{"login":"benmccallum","id":157336,"avatar_url":"https://avatars.githubusercontent.com/u/157336?v=3","gravatar_id":"","url":"https://api.github.com/users/benmccallum","html_url":"https://github.com/benmccallum","followers_url":"https://api.github.com/users/benmccallum/followers","following_url":"https://api.github.com/users/benmccallum/following{/other_user}","gists_url":"https://api.github.com/users/benmccallum/gists{/gist_id}","starred_url":"https://api.github.com/users/benmccallum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmccallum/subscriptions","organizations_url":"https://api.github.com/users/benmccallum/orgs","repos_url":"https://api.github.com/users/benmccallum/repos","events_url":"https://api.github.com/users/benmccallum/events{/privacy}","received_events_url":"https://api.github.com/users/benmccallum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-08T12:06:07Z","updated_at":"2015-06-08T12:06:07Z","closed_at":null,"body":"Hey guys, \r\n\r\nJust poking around the source code and really liking how TagHelpers (in the appropriate scenarios)  have an asp-append-version attribute that will render a hash of the file contents to the end of the URL path like: myjsfile.js?v=8620562345.\r\n\r\nUnfortunately, in the past I've had bad experiences with using querystrings for cache-busting.\r\n1. Services like CDNs (Akamai) often ignore them by default, not doing any cache-busting unless some configuration is done to respect that value.\r\n2. Google PageSpeed warns against query strings on static files, saying that some proxy servers avoiding caching entirely. So it'd be good to not have a warning appear using an ASP.NET framework feature.\r\n![image](https://cloud.githubusercontent.com/assets/157336/8034228/1d5901f6-0e29-11e5-94f0-f72d1525102f.png)\r\n\r\nRight now, I typically use a fingerprinting technique that changes the file path like so: myjsfile.ver-8620562345.js, matching a Google recommendation [here](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#invalidating-and-updating-cached-responses). Of course the file doesn't really exist at that path, so I pair it with a <rewrite><rule> so it will correctly map to the real physical file. \r\n\r\nIs something similar achievable out-of-the-box in mvc6? That'd be my preference, but not sure how to easily/cleanly plug-in the URL rewriting.\r\n\r\nAnother, less preferred solution, would be to, support a provider model with DI (given the class is named FileVersionProvider). That way a NuGet package could swap in the new provider and add the custom rewrite rule easily, though I'm not sure what rewrite config looks like in aspnet5.\r\n\r\nCheers,\r\nBen"}}