You must Sign In to post a response.
  • Category: ASP.Net MVC

    How to clear browser cache programmatically in angular js

    Hi,
    I have a angular web application.when i deploy it on server the client got displayed the old Html on the page.to receive the new changes in html the client has to clear the browser cache himself.so is there any way to do it pro-grammatically ?so that the client will see the latest html uploaded.
  • #769622
    solution1: Manage your meta tags to not cache the stuff

    <meta http-equiv='cache-control' content='no-cache'>
    <meta http-equiv='expires' content='0'>
    <meta http-equiv='pragma' content='no-cache'>

    solution2:
    try this:

    window.location.reload() //but make sure you need cached data at all.

    Thanks!
    Anjali

    Thanks!
    Anjali Bansal

    ~Give your best and lead the world


  • Sign In to post your comments