[Offline Apps] How to fallback to an offline screen when user enter an URL with no offline support?

[Offline Apps] How to fallback to an offline screen when user enter an URL with no offline support?

  
Forge Component
(25)
Published on 2015-11-19 by OutSystems Labs
25 votes
Published on 2015-11-19 by OutSystems Labs
For my project, I only need to add offline support for a few pages, but I want to redirect user to one of the offline screen if no internet connection when user try to open an URL which is not offline enabled. Can someone share some ideas on how to achieve this? 
Hello wei.

If you have the latest version of the Offline component, you'll find that you have a web block called "Offlineredirect" that does just what you're asking for!

Cheers
Hi Pedro,

If I understand it correctly, the web block "Offlineredirect" will redirect user only if user is already on the page when connection is lost. My case, I have to redirect user to an offline page when user enter a URL which is not reachable because there is no connection. I end up generating my own cache manifest file, and manually list all resources that need to be cached, and put the fallback URL there. It solves my problem.

Cheers
Ok, seems like a great solution. What we did in our apps was to disable the buttons that navigate away from the offline enabled pages.
It would be nice if there is API to add the fallback URL to the auto generated cache manifest, or a component a developer can drop on a screen to make it as fallback screen