old way:Use the main frame to run a script that checks if the connection is OK. When it fails raise a flag and when the connection is restored again then launch again the iframe with the home page.

new way:Turn your page into a progressive web app that use service workers and all the new shiny stuff to control network state and use your own cache so the page works even without network connection.