Skip to content

Instantly share code, notes, and snippets.

@hansott
Created December 15, 2014 21:48
Show Gist options
  • Save hansott/206b1eaf53af31e43c71 to your computer and use it in GitHub Desktop.
Save hansott/206b1eaf53af31e43c71 to your computer and use it in GitHub Desktop.
Disable browser caching in razor templates (ASP.NET MVC)
@{
var random = new Random();
int r = random.Next(1000);
}
<p><img src="@Url.Content("~/images/records/" + Model.id + ".jpg")?time=@r" alt="Album cover" class="img-responsive" /></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment