Avoid hardcoding extension IDs in your scripts, as Firefox generates unique IDs for every installation. 4. Testing and Debugging
Certain features, like Chrome’s sidePanel API, are not natively available in Firefox, which uses a different sidebarAction API instead.
| Chrome | Firefox | Action | |--------|---------|--------| | manifest_version : 3 (or 2) | Supports MV3, but some MV2 features deprecated | Prefer MV3 for future-proofing | | background.service_worker | background.scripts or background.page | Replace SW with background scripts (or use background.service_worker in MV3) | | action (MV3) | browser_action (MV2) / action (MV3) | Use MV3 naming if targeting both | | optional_host_permissions | optional_permissions with *://*/* | Adjust permission keys | | declarative_net_request | Partial support (rule limits differ) | Test rule sets; max 100k static rules vs Chrome’s 300k | convert chrome extension to firefox
Chrome uses the chrome.* namespace, while Firefox primarily uses browser.* . Although Firefox supports chrome as an alias for many APIs, using browser is recommended for full WebExtension standard compliance. 3. Adjust Code and APIs
A Methodological Framework for Porting Google Chrome Extensions to Mozilla Firefox: API Compatibility and Manifest V3 Considerations Avoid hardcoding extension IDs in your scripts, as
Chrome MV3 imposes strict CSP limitations, disallowing remotely hosted code.
Chrome separates storage into sync , local , and managed . Firefox mirrors this structure. However, chrome.storage.sync has strict rate limits in Chrome; Firefox’s implementation has different quota limits. Developers must test storage limits specifically for Firefox. | Chrome | Firefox | Action | |--------|---------|--------|
While Chrome has moved heavily toward Manifest V3, Firefox still offers robust support for Manifest V2, which may be more stable for certain background script functionalities.