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

No comments:

Post a Comment