Customize Chromium/Google Chrome error pages

倾然丶 夕夏残阳落幕 提交于 2019-12-08 16:12:10

问题


How can I customize the error pages Google Chrome/Chromium displays when there is a networking error (e.g. Error 137 net::ERR_NAME_RESOLUTION_FAILED)

I'm talking about these kinds of pages: http://i41.tinypic.com/29qm8v6.png

They don't seem to be stored anywhere on the file system. Can the errors that make them display be trapped using an extension?

Thanks for any advice.


回答1:


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.




回答2:


No :( Correct link at this moment: https://chromium.googlesource.com/chromium/chromium/+/master/chrome/renderer/localized_error.cc



来源:https://stackoverflow.com/questions/8071984/customize-chromium-google-chrome-error-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!