SShortSingh.
Back to feed

Five Manifest V3 Pitfalls Chrome Extension Developers Should Know Before Shipping

0
·1 views

A developer has outlined five common Manifest V3 mistakes that can silently break Chrome extensions in production. Unlike the older persistent background pages, Manifest V3 service workers are killed when idle, meaning in-memory variables must be replaced with chrome.storage to persist data between events. Event listeners must be registered synchronously at the top level of a script, not inside callbacks or promises, or they risk never firing. Inline scripts and onclick attributes are blocked by Manifest V3's content security policy, requiring all logic to be moved into external JavaScript files. Additionally, asynchronous message passing requires a 'return true' statement to keep the channel open, and developers are advised to request only necessary host permissions to avoid store review delays and user distrust.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Builds AI-Powered Redirect Manager Using MCP in Under 10 Minutes

A developer has shared a method for building an AI-powered redirect management bot using the Model Context Protocol (MCP) and RedirHub, requiring no custom code to set up. The bot connects an AI agent, such as Claude or Codex, to RedirHub's API, enabling it to create, update, and monitor redirects through natural-language commands. Key capabilities include bulk CSV imports, SSL and DNS health checks, Slack or email failure alerts, and role-based team collaboration. In a real-world example, a marketing agency used the bot to migrate 850 redirects from a legacy CMS in four minutes, a task that would otherwise have taken two full days. The MCP server is available on all RedirHub plans, including the free tier, and is compatible with any AI agent that supports the open MCP standard.

0
ProgrammingDEV Community ·

SVG, PNG, WebP or JPEG: How to Choose the Right Image Format for the Web

Selecting the correct image format directly affects bandwidth usage and page load times for end users. A developer-shared framework recommends PNG for documentation screenshots, WebP at quality 80 for hero images and blog photos, and JPEG at quality 85 for user uploads and emails. In a real-world test, switching hero images from PNG to WebP reduced first-load size by 1.2MB, cutting roughly 0.3 seconds on a 3G connection. Batch conversion tools and command-line utilities such as imgbatch can help migrate existing image libraries without complex setup. The guidance underscores that image format decisions are a practical performance concern rather than a purely visual one.

0
ProgrammingDEV Community ·

A Practical API Testing Strategy to Catch Bugs Before Production

Most API failures stem from common issues like missing fields, wrong status codes, timeouts, or breaking changes that go undetected without a structured testing approach. An API testing strategy defines what to test, at which layer, and when during the delivery cycle — balancing maximum coverage against minimum maintenance cost. Engineers are advised to prioritize endpoints by business risk, traffic volume, data sensitivity, and frequency of change rather than ease of access. Tests should be divided by speed and purpose: fast unit tests run on every commit, integration tests at moderate intervals, and load or security tests before major releases. Mixing all tests into a single pipeline leads to either slow feedback or insufficient coverage, making a layered pyramid model the recommended framework.

0
ProgrammingDEV Community ·

wrk: A Command-Line Tool for HTTP Load Testing Your API Endpoints

wrk is a modern HTTP performance testing tool that runs on a single multi-core machine, using multiple threads and a scalable event loop to simulate heavy traffic without requiring a fleet of test servers. It helps developers answer key questions about API throughput, latency percentiles, and stability under sustained load. The tool is installed via Homebrew on macOS or built from source on Linux, and operates with simple flags for threads, connections, and test duration. Output metrics include requests per second, data transfer rate, and latency distribution — with the p99 figure being especially important for detecting tail latency issues. wrk is strictly a performance measurement tool and does not validate response correctness, status codes, or API contracts.