Question

I am new to extension development. My requirement is to create a simple extension which modifies some response headers and adds some new headers to the http response. I was looking through some addons like redisposition and inline disposition. The former one does the same job without using xpcom and the later one uses xpcom. Also the former one has xul (gui) components too. Now, is it possible to modify the response if extension has no overlay (gui components).

Was it helpful?

Solution

You don't need a GUI.

There are several ways to get your code running:

  • Create a bootstrapped (restartless) add-on, just like ReDisposition (The GUI parts there are not required) and register from your bootstrap.js.
  • Create an SDK add-on and register from your main.js.
  • Create an XPCOM component and register it for profile-after-change (run at startup, basically) and register once the component gets loaded.
  • Or have a stub overlay, that will just load a JS code module and register in the module. (A little hackish for my taste, but anyway).

Anyway, in the end, you'll need to register and observe http-examine-response and friends, no matter what method you use, or what

See MDN for more documentation (and the wiki).

Other than that, your question is too broad to tell you something less general.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top