Knowledge on .NET Development, iPhone App Development, Android App Development, SQL Server, and everything related Computer Science
Thursday, May 26, 2016
Force Client to Download new resource files
Code behind
//add the version number to the css and js link
string host = Request.Url.Host;
if (host.ToLower().IndexOf("dev") > 0 || host.ToLower().IndexOf("test") > 0)
{
Random rnd = new Random();
version = rnd.Next().ToString();
}
else {
version = ConfigurationSettings.AppSettings["app_version"];
}
https://www.iis.net/configreference/system.webserver/staticcontent/clientcache
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment