SaaS CMS has officially launched! Learn more now.

Suggestion: add a "v=123456789" query parameter to static file urls

Vote:
 

When using the UrlHelper extension Url.ContentUrl(this UrlHelper urlHelper, ContentReference contentLink) I get a url in the form http://domain/globalassets/file.txt. As this is static content it gets cached by most browsers. If an editor edits the file.txt file and decides to replace the existing file when uploaded to the assets manager, the url will still be same. Whouldn't it be better if updated static files gets a query parameter appended (e.g. http://domain/globalassets/file.txt?v=123456789) in order to trigger a refresh by the browser?

#81637
Feb 21, 2014 11:10
Vote:
 

Hmmm.. this post really received a screwed layout. Maybe you should look into that as well ;)

#81639
Feb 21, 2014 12:00
Vote:
 

I've got a module that handles this, but only for images. Maybe you can extend that? I just uploaded it here: https://github.com/torjue/EpiCdnHandler . It just handles images, but feel free to add support for any media types. I will create a nuget package for it soon.

#81655
Edited, Feb 22, 2014 23:01
Vote:
 

Thanks Torjus! I will have a look at it :)

#82065
Mar 05, 2014 9:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.