Base solution for your next web application
Open Closed

Clear Web Browser cache on deploy #11494


User avatar
0
Leonardo.Willrich created

Hi,

When there is a new release deployed the users always have to press CTRL + F5 to clear the cache and reload the Javascript and CSS files correctly.

I wonder if there is a way to automatically reload or clear the cache when there is a new version deployed. I've seen that for service works in ABP.IO Blazor WebAssembly projects.

Kind regards,

Leonardo Willrich.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We have implemented a feature for this, see https://github.com/aspnetzero/aspnet-zero-core/pull/4496. Basically, when a new version is released, you can send a notification to all users adn they will be forced to refresh their pages.

  • User Avatar
    0
    Leonardo.Willrich created

    Hi,

    I could access the item, but, I didn't understand how the cache is invalidated in the clients. Could you explain how to do it? Also, what is gonna happen if the user is not logged in at that time, will he miss the notification?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    A request will be sent to /BrowserCacheCleaner/Clear endpoint and it will clear the cache. User will be notified after the login in that case.