Custom about: URLs

This page describes how to register a new about: URL for your extension.

Setup for Firefox 4+

This is a simple example of a custom about page for bootstrapped addons. This example creates an about page with url about:myaboutpage which takes a user to a page that writes some text out.

Make sure to generate a unique aboutPage_id, see this page to learn more about generating UUID's: UUID.

It is imported to QueryInterface the Components.manager otherwise this will not work.

This example can be easily modified, just modify the global const at in the // globals section.

In Bug 1254752 things changed for Firefox 48 and up. was deprecated, and the signature of the newChannel method changed. This change is reflected in the code below. This code will work for all versions of Firefox 4 and up.

const {classes: Cc, interfaces: Ci, manager: Cm, results: Cr, utils: Cu, Constructor: CC} = Components;


// globals
var factory;
const aboutPage_description = 'This is my custom about page';
const aboutPage_id = 'aa132730-2278-11e5-867f-0800200c9a66'; // make sure you generate a unique id from
const aboutPage_word = 'myaboutpage'
const aboutPage_page = 'data:text/html,hi this is the page that is shown when navigate to about:myaboutpage';

function AboutCustom() {}
AboutCustom.prototype = Object.freeze({
    classDescription: aboutPage_description,
    contractID: ';1?what=' + aboutPage_word,
    classID: Components.ID('{' + aboutPage_id + '}'),
    QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),

    getURIFlags: function(aURI) {
        return Ci.nsIAboutModule.ALLOW_SCRIPT;

    newChannel: function(aURI, aSecurity_or_aLoadInfo) {
        var channel;
        if (, '47.*') > 0) {
              let uri =, null, null);
              // greater than or equal to firefox48 so aSecurity_or_aLoadInfo is aLoadInfo
              channel =, aSecurity_or_aLoadInfo); 
        } else {
              // less then firefox48 aSecurity_or_aLoadInfo is aSecurity
              channel =, null, null);
        channel.originalURI = aURI;
        return channel;

function Factory(component) {
    this.createInstance = function(outer, iid) {
        if (outer) {
            throw Cr.NS_ERROR_NO_AGGREGATION;
        return new component();
    this.register = function() {
        Cm.registerFactory(component.prototype.classID, component.prototype.classDescription, component.prototype.contractID, this);
    this.unregister = function() {
        Cm.unregisterFactory(component.prototype.classID, this);


Instantiation Firefox 4+

Now in the startup procedure of your bootstrapped addon make sure to do register the factory, for example:

function startup(aData, aReason) {
    // ...
    factory = new Factory(AboutCustom);
    // ...

And then on shutdown of your bootstrapped addon make sure to destroy the factory:

function shutdown(aData, aReason) {
    if (aReason == APP_SHUTDOWN) { return }
    // ...
    // ....

And there you have it, your own custom about page.

See Also

Document Tags and Contributors

 Contributors to this page: Noitidart, Np, yarrkov, Sheppy, Wikiwide, MichaelKohler
 Last updated by: Noitidart,