You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configure service worker not to present stale content for frequently visited landing pages #22080
Right now we check for available updates every 6 hours I think. Once an update has been downloaded, the new content should be displayed on new navigations. So, theoretically, the content (after a navigation - either in-app or new page) should not be staler than that.
I can't think of another way to ensure freshness without affecting the TTI.
Wait! What if we show a snackbar when an update is available prompting the user to reload the page 😁 (déjà vu)
What if we show a snackbar when an update is available prompting the user to reload the page
That's precisely what I'm looking to do in my app. Is there docs on how to do this? An event we can listen for perhaps? Bonus points for an event for when an update is installing so the user doesn't navigate away and brick their application.
Yes, it is still an issue, but I don't know of a good way to solve it without affecting the TTI.
So, given that (and the fact that this is low in priority), I think we can close it for now.
Activity
gkalpak commentedon Feb 8, 2018
Right now we check for available updates every 6 hours I think. Once an update has been downloaded, the new content should be displayed on new navigations. So, theoretically, the content (after a navigation - either in-app or new page) should not be staler than that.
I can't think of another way to ensure freshness without affecting the TTI.
Wait! What if we show a snackbar when an update is available prompting the user to reload the page 😁
(déjà vu)
rjcorwin commentedon Jul 30, 2018
That's precisely what I'm looking to do in my app. Is there docs on how to do this? An event we can listen for perhaps? Bonus points for an event for when an update is installing so the user doesn't navigate away and brick their application.
gkalpak commentedon Jul 30, 2018
This is what angular.io used to do, but people where finding it annoying 🤷♂️
I could link you to the code, but it used an old version of
@angular/service-worker, so that wouldn't be very useful to you.With the latest
@angular/service-worker, you should use the SwUpdate service (see also here for more info).Ploppy3 commentedon Jul 31, 2018
@rjsteinert It's actually quite simple:
jessicajaniuk commentedon Mar 28, 2022
@gkalpak Is this still an issue?
gkalpak commentedon Mar 29, 2022
Yes, it is still an issue, but I don't know of a good way to solve it without affecting the TTI.
So, given that (and the fact that this is low in priority), I think we can close it for now.
angular-automatic-lock-bot commentedon Apr 29, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.