1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Why is the @angular/pwa package not caching correctly since Angular version 17?

Discussão em 'Angular' iniciado por Joandreiy Cordeiro, Novembro 5, 2024 às 17:43.

  1. I was using Angular version 16 with the @angular/pwa package working properly and my SPA project was working offline.

    When I migrated to version 17 I noticed that the cache was no longer working, since I didn't need to worry about it at the time I left it to check later, then version 18 was released, I did the migration and the cache problem continued.

    I thought that my migration from version 16 to 17 and 17 to 18 had some problem, but my application works normally, except for the cache.

    So I created 4 clean versions of Angular (15,16,17,18) and only installed the @angular/pwa package in them, built them for production, uploaded them to my Hostinger server and opened each version in an anonymous tab, and only the 15 and 16 versions have the cache working.

    What I noticed in Google Chrome DevTools is that the service worker is installed and running correctly, but it is not downloading the essential files for the SPA to work. Example: index.html and other essential files.

    If you need the source codes, they are here: https://github.com/joandreiy/angular-pwa-problem

    Thanks for your help!

    Angular 15 https://teste-perfilplast.integrefacil.com.br/app15/ [​IMG] Angular 16 https://teste-perfilplast.integrefacil.com.br/app16/ [​IMG] Angular 17 https://teste-perfilplast.integrefacil.com.br/app17/ [​IMG] Angular 18 https://teste-perfilplast.integrefacil.com.br/app18/ [​IMG]

    Continue reading...

Compartilhe esta Página