Return to Responsive profile from Tablet Offline / Phone Offline

1
Hi all, I’m running into an issue where i’m unable to return from an offline profile back to the responsive profile. At the moment we have a case where a offline profile user should be able to navigate back to a responsive profile to do some actions in the responsive part of the app and later return to the offline PWA. But there is no way for me to move from the offline page back to the responsive profile, because it looks like everything is received from cache first. Browser console states no profile kind is passed when i try to open the url https://<base>/index3.html?profile=Responsive. When i look into service-worker.js, i noticed only the offline profiles are there, that explains the issue above, My question is how to open an url from an offline profile that uses a service worker. How to bypass the service worker, or hard reload a page from the server. It works in a local environment because the service worker is not active there. Some smart JS or redirect logic perhaps? Things i tried - Open URL with Responsive profile as parameter → cached offline page is loaded - Close page, Open URL → cached offline page is loaded - location.replace() JS → cached page is loaded
asked
1 answers
0

When Mendix PWA's were constrained to offline capabilities, I have used online and offline events to trigger a nanoflow. In the nanoflow, a Javascript action was executed to reload the page without cache. This worked for me back then.

I cannot find the working project, but this should be able to do it:

https://stackoverflow.com/questions/33216562/how-to-open-a-new-url-with-javascript-and-without-cache 

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/Online_and_offline_events

 

answered