javascript - Avoid caching JS, CSS files page after each deployment -


we using asp.net. in front end, using html pages. server side code not used there. implementing "login.js?s09809808098" can resolve this. can't manually edit on every pages before each deployment. there method edit html pages in server side when page requested. or other method resolve issue?

you can try adding expiration headers , dont cache headers fix problem. can create center repo static url assests , when repo return url append software version login.js?v1 way new version every release. define version number property in repo class.

public static class urlrepo {     public string appversion = "1";     public string geturl (enumurlname urls)     {      switch(enumurlname)      {        case enumurlname.loginjs             return "login.js?v" + appversion;             break;      }     } } public enum enumurlname {    loginjs,    logincss } 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -