Search code examples
c#browserbrowser-cache

Browser History/cache Clean through c# code


My question is ,
Can i clean Browser cache/history through code(c#).
because, Browser always stored previous angular/css. Everytime, we have to clear manually(By Cntrl+Shift+Del).
Is there any C# Code to clear history with button click.
Thank you.


Solution

  • The solution worked for me..

    just add ?v1 or ?v2 after anyfile in layout page.so that browser can identify that it is a new file.

    <script src="~/Scripts/angularcontroller.js?v1"></script>