I\'m deploying a kiosk system that uses Chrome to display a java web app running in jetty started with a windows service wrapper. It takes some time after the system starts
You can customize the error page with webNavigation API. Add an event Listener for onErrorOccurred event and update relevant details.
Check sample code as a reference.
Registered background page and added all relevant permissions to manifest file.
{
"name": "Customize error page",
"description": "",
"version": "1",
"manifest_version": 2,
"background": {
"scripts": [
"background.js"
]
},
"permissions": [
"webNavigation",
"<all_urls>"
],
"web_accessible_resources": [
"page.html"
]
}
Redirected to our custom Page in case of any error, you can customize this to desired level.
//Adding a Listener to Error Occured Event
chrome.webNavigation.onErrorOccurred.addListener(function (details) {
// Updating the browser window with desired URL
chrome.tabs.update(details.tabId, {
url: chrome.extension.getURL("page.html")
});
});
Some trivial code
<html>
<style>
body {
background:yellow;
position:absolute;
}
</style>
<body>
<div style="top: 200px;position: absolute;left: 500px;width: 500;font-size: 40px;">This is a Nice Description</div>
</body>
</html>
Go to options, privacy settings, and uncheck the box:
"Use a web service to help resolve navigation errors"
Detailed instructions here.