skip to Main Content

I am uploading an updated angular website version to IIS. However when I load the Site in a browser the old version appears. When I stop the site, still the old version appears.

I want the new version of the website to appear? What am I doing wrong ?

I am not using Service Worker at this point since it was a code written with angular 9 we have just upgraded the version to angular 17

UPDATE:

I notice we have AWS ROUTE 53 DNS caches that my affect loading of the old Site. Kindly guide me how I can clear this cache where my Alias is set to yes we a load balancer configured. No TTL timer.

2

Answers


  1. It sounds like you’re running into a caching issue, which is pretty common with Progressive Web Apps (PWAs) built with Angular. Here are some steps you can take to fix it:

    1. Hard Refresh: Try doing a hard refresh in your browser to clear the cache and load the latest version of your site. On Windows, press Ctrl + F5, and on Mac, press Cmd + Shift + R.

    2. Versioning: Implement versioning in your Angular app by updating the ngsw-config.json file with a new version number each time you deploy. This ensures the browser downloads the latest files.

    3. Service Worker: If your app uses a service worker, it might be serving a cached version. Update your service worker configuration to make sure it fetches the latest content.

    4. Clear Cache: You can manually clear the browser cache or set cache headers on your server to manage caching behavior.

    By following these steps, you should be able to make sure your Angular website always shows the latest version.

    Login or Signup to reply.
  2. The issue you are experiencing where the old version of your Angular website still appears after deployment is typically related to caching.

    1.Clear Browser Cache: In Chrome, you can clear the cache by going to Settings > Privacy and security > Clear browsing data, and then selecting Cached images and files.

    2.Using Developer Tools:

    • Open Chrome DevTools by pressing F12 or right-clicking on the page
      and selecting Inspect.
    • Go to the Network tab.
    • Check the Disable cache box (while DevTools is open).

    3.Restart IIS to clear its cache: Open a command prompt with administrative privileges and run iisreset

    4.Use the network inspection tools in the browser’s developer tools to verify which files are being loaded and from where.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search