Requestly is a beautiful chrome extension for modifying network requests. It has hit the ground hard and announced its presence in market sound and fair. Its usage has grown tremendously over last few months. As of March 2016, Chrome store shows 7.5K users. Due to simple interface with infinite possibilities it is becoming popular among web devs for testing and debugging purposes. I have received multiple requests for developing Requestly on Firefox. It was certainly not easy to build Requestly with Firefox Add-On APIs but the support of Web Extension APIs in Firefox has made the job easy. This article is the first step in direction for porting Requestly to Firefox.
Analysis of Chrome APIs Incompatibilities
- Content Scripts: Supported
- Background Scripts: Supported
- Storage API: Partially Supported with following road blockers:
chrome.storage.syncis not supported. We can use ‘chrome.storage.local` for the time.
chrome.storageis not accessible in Content Scripts. Bugzilla Link
- NameSpacing: Currently all APIs are accessible through
chrome.*but later on this will be moved to
- Does not require immediate change but we may have to modularize the code using browserify and instantiate different packages for different browsers
- Packaging: Firefox needs
xpiextension instead of
- This is in roadmap that webextensions should be accepted as zip but initially we may have to rename zip to xpi before uploading to FF store.
- Tabs: Partially Supported for our needs.
- In Firefox, you need the
tabspermission if you want to include url in the queryInfo parameter to
- webRequest: Partially supported but meets our needs.
- In Firefox requests can be redirected only if their original URL uses the http or https scheme
- Manifest: Firefox manifest.json has mandatory
applicationskey and we can’t use this in chrome extensions.
- We need to maintain two different manifest files for chrome and browser and build system should pick them as per browser.
- Context Menus: Partially supported.
browser_actionare not supported.
- We need to change
allfor the time this is supported in firefox.
For More details, Refer Mozilla documentation on chrome APIs Incompatibilities