Base solution for your next web application
Open Closed

How to Force cache refresh after deployment #7790


User avatar
0
kwanp created

my project on ASP.NET CORE & Angular Pusblish to IIS I have some problem everytime i get up date the project and my clients machine have to manual clear cookies and caahe to get the page update

any one have any idea to solve this problem Thank you


8 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, can you provide the ANZ version as well?

    also, what is the cached data you have encoutered?

  • User Avatar
    0
    kwanp created

    my version v6.9.1

    what is the cached data you have encoutered? -> the problem happen when i pusblish new project to IIS Server and my client resfresh the browser but nothing change just have to click clear cookies to get the resfresh page

    Thank you

  • User Avatar
    1
    ismcagdas created
    Support Team

    Hi @kwanp

    Do you mean clients use old JavaScript files until they clear cookies ?

  • User Avatar
    0
    kwanp created

    Hi @ismcagdas Yes my clients use old JavaScript files until they clear cookies

    How can i fix this issue

    Thank you

  • User Avatar
    0
    musa.demir created

    Are you using asp-append-version="true" ?

    Like:

    <script abp-src="path" asp-append-version="true"></script>
    
  • User Avatar
    0
    kwanp created

    Hi @demirmusa where can i find this tag is in angular or asp.net core <script abp-src="path" asp-append-version="true"></script>

    Thank you

  • User Avatar
    0
    musa.demir created

    Hi @kwanp. Sorry I didn't see you said angular :)

    Whenever you build your project with ng build --prod command angular adds a new guid-like string at the end of your files so that users don't use the cached file.

    Can you please check that.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.