The reality is I’m very new to ionic and I’m trying to test my pwa on mobile device so I need to have some app refresh sort of because now I’m struggling to refresh my app on the device. In browser I can not test a lot of native features. I found your code on the net so I thought I give it a try but didn’t managed to implement it the right way. In browser testing I don’t get the toast to show, on mobile too. With ionic serve I get no problem but than I get the latest version all the time so there isn’t the case. If I load the pwa in desktop browser, I get this: Uncaught TypeError: Cannot read property ‘then’ of undefined in main.ts: “window[‘isUpdateAvailable’].then(“ so here is my main issue, where do I put this code to have window object?