FullPageOS
FullPageOS copied to clipboard
Customize CHROME error page or redirect to a fallback/download
I wanted to customize that or to get that event somehow. Sometimes chrome fails, and then we get the dinosaur game. My questions are:
-
Is there an event or a way to know that a crash happened (whatever the reason)?
-
Can we customize the behaviour of the post-crash, somehow?
-
In cases where the website can not be loaded, not just a crash, because of wifi problems (for instance), I was thinking about redirecting chrome to a local file (I suposse it's doable), and having that file load content from a distant server, so as to be able to do the proper checks. And, on top of that, a daemon python scripts that downloads/updates that page if there are is a new version available. (This has also the advantage that on every restart, everything loads quite fast, if we download the files to a local folder and update just what changed from a repository). Do you see any problems that could arise if I use this method?
Thanks for the insight!
Yes, there is a way to check internet connectivity. See: https://github.com/guysoft/FullPageOS/blob/devel/src/modules/fullpageos/filesystem/home/pi/scripts/start_chromium_browser#L7
No, trapping is not possible, and the HTML for the error pages gets built at runtime from compiled resources. See http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/localized_error.cc?view=markup for the code that builds these error pages Source: https://stackoverflow.com/a/8668401/311268
- You could have a local page that has an auto-refresh setup, something similar in javascript. See: https://stackoverflow.com/a/32913581/311268 There are quite a few examples of responsive website that handle requests errors. Depends how much you want to actullaly code.