I am porting Requestly - Chrome Extension chrome store link to Firefox web extension. Basically, we can manipulate HTTP(s) requests like redirecting, blocking, manipulating headers etc.
Chrome allows to redirect a request in onBeforeRequest phase existing implementation but Mozilla Api does not allow redirection in onBeforeRequest phase but allows in onBeforeSendHeaders phase.
Check this out: “Redirection is not allowed in onBeforeRequest or onHeadersReceived, but is allowed in onBeforeSendHeaders.” available at API Docs
Why is there a difference between both the APIs ? Is there going to be a standard by w3c which should be followed by each browser. Otherwise, it would be difficult to handle such things within code.