I am currently adding ?t=@(DateTime.Now.ToString("yyyyMMddHHmmss")) to every single js or css file in my project to update the cache automatically. Is there a way to make a c# method that will do that for me everytime i use a new js and/or css ?
-
2are you using core? c-sharpcorner.com/blogs/…Bryan Dellinger– Bryan Dellinger2020-10-14 00:33:21 +00:00Commented Oct 14, 2020 at 0:33
-
@BryanDellinger That looks like exactly what i need. Sadly, i am not using Core... is there a similar solution for non core users ?Arly C.– Arly C.2020-10-14 00:50:43 +00:00Commented Oct 14, 2020 at 0:50
-
1the answer here provides a decent way to implement this. BTW, what you are doing is called versioning, that may help you in searchingJonesopolis– Jonesopolis2020-10-14 01:31:28 +00:00Commented Oct 14, 2020 at 1:31
Add a comment
|