1

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 ?

3
  • 2
    are you using core? c-sharpcorner.com/blogs/… Commented 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 ? Commented Oct 14, 2020 at 0:50
  • 1
    the answer here provides a decent way to implement this. BTW, what you are doing is called versioning, that may help you in searching Commented Oct 14, 2020 at 1:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.