自定义Chromium / Google Chrome错误页面 [英] Customize Chromium/Google Chrome error pages

查看:413
本文介绍了自定义Chromium / Google Chrome错误页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何自定义出现网络错误时Google Chrome / Chromium显示的错误页面(例如,错误137 net :: ERR_NAME_RESOLUTION_FAILED)

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)

我在说这些类型的网页: http://i41.tinypic.com/29qm8v6.png

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.

推荐答案

没有,陷印是不可能的,并且错误页面的HTML是在编译资源的运行时生成的。请参阅 http://src.chromium。 org / viewvc / chrome / trunk / src / chrome / renderer / localized_error.cc?view =标记来编译这些错误页面的代码。

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.

这篇关于自定义Chromium / Google Chrome错误页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆