Back to KB
Difficulty
Intermediate
Read Time
5 min

Firefox Extension Manifest V3 Migration: What Actually Changed

By Codcompass TeamΒ·Β·5 min read

Current Situation Analysis

Browser extension development has historically relied on persistent background scripts and permissive security models. However, Manifest V2 (MV2) introduces critical architectural limitations: background pages remain permanently resident in memory, causing unnecessary resource consumption and expanding the attack surface. Chrome's aggressive Manifest V3 (MV3) rollout attempted to solve this by enforcing service workers and replacing the blocking webRequest API with declarativeNetRequest, but this broke critical use cases like ad-blockers and network interceptors.

Firefox's MV3 implementation takes a balanced, developer-friendly approach but introduces significant behavioral shifts that break traditional extension patterns:

  • Persistent State Assumption Failure: Developers accustomed to in-memory globals (window.myState) face silent crashes when service workers suspend on idle.
  • CSP Enforcement Breakage: Legacy dependencies relying on eval() or unsafe-eval fail immediately under MV3's strict Content Security Policy.
  • Permission Model Fragmentation: Host permissions are no longer bundled with standard permissions, causing silent authorization failures if not explicitly migrated to host_permissions.
  • UI Key Deprecation: The split browser_action/page_action model is unified into action, breaking manifest parsers that expect legacy keys.

Traditional MV2 development workflows fail because they assume a long-running execution context, relaxed script evaluation, and monolithic permission declarations. MV3 demands event-driven architecture, persistent storage fallbacks, and strict CSP compliance.

WOW Moment: Key Findings

ApproachBlocking WebRequest SupportBackground Execution ModelCSP eval() SupportAvg. Migration EffortIdle Memory Footprint
Firefox MV2Full (Blocking)Persistent (Always On)Allowed (Loose)0 (Baseline)~15–20 MB
Firefox MV3Full (Blocking)Event-driven (Terminates on Idle)Blocked (Strict)~5–10 lines~2–5 MB
Chrome MV3Limited (DeclarativeNetRequest Only)Event-driven (Terminates on Idle)Blocked (Stri

πŸŽ‰ Mid-Year Sale β€” Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register β€” Start Free Trial

7-day free trial Β· Cancel anytime Β· 30-day money-back