How to redirect a Web_Viewer online to a stored html file?

Hello! What is the best way to arrange blocks for a web_viewer so it checks for internet, if present go to the web, if not go to the stored html file?

Thank you!

I have not built a function like this, but in the devices blocks there is “device online” function.

See the documentation here.