Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I customize error messages.

  • 3 replies
  • 1 has this problem
  • 1 view
  • Last reply by cor-el

more options

I have my own scripts and I would like to customize some error pages so it can take some customized actions. - Is this possible? - Where to start from? - Where to grap the error HTML page and where to place my script? - If not, what are the alternatives? can I perfrom this via an extension? But the problem is that I want to display my error page before the original error page appears. I could not find a way to do such thing as "page-mod" changes URLs and I could not find the error pages URL that get displayed. When error occurs, the same URL stays as it is in the URL bar without error page link.

I have my own scripts and I would like to customize some error pages so it can take some customized actions. - Is this possible? - Where to start from? - Where to grap the error HTML page and where to place my script? - If not, what are the alternatives? can I perfrom this via an extension? But the problem is that I want to display my error page before the original error page appears. I could not find a way to do such thing as "page-mod" changes URLs and I could not find the error pages URL that get displayed. When error occurs, the same URL stays as it is in the URL bar without error page link.

All Replies (3)

more options

There are built-in about pages like these (about:neterror):

more options

I viewed the code. Neat but quite complex to be honest. Can you give a simple example please on how to specify the parameters for one error message, e.g. how to change the script. Where are these parameters read from? For example: "<title>&loadError.label;</title>", where is "loadError.label" is read from? how can I customize it?

more options

The entities are defined in the files that you can see are linked.

Customizing these pages is beyond the scope of this forum and best would be to ask advice at the Add-ons forum since you would need an extension. I do not know if this is possible with a WebExtension because otherwise your XUL based extension will stop working in Firefox 57+.