Secure Message Passing in Chrome Extensions
Build Chrome extension message handlers with sender checks, bounded runtime schemas, narrow operations, asynchronous responses, and no arbitrary privileged commands.
// Technical guide archive
More practical engineering notes, ordered by publication date.
Build Chrome extension message handlers with sender checks, bounded runtime schemas, narrow operations, asynchronous responses, and no arbitrary privileged commands.
Use Chrome’s Tabs API with the smallest access: distinguish tab IDs from sensitive properties, bind actions to the chosen tab, and handle navigation or closure.
Separate cookie transport from JWT token format, then choose a session design around revocation, browser threats, validation, logout, and access boundaries.
Check Next.js statuses, canonical URLs, robots, sitemaps, language alternates, metadata, and rendered content using the deployed production response.
Place App Router loading and error boundaries around useful regions, distinguish expected failures, and use version-correct recovery behavior for Next.js 16.2.
Make tenant membership and data scope explicit across SaaS queries, writes, caches, files, background work, and database policies before choosing isolation topology.
Write a truthful Chrome Web Store listing with a concrete first-use explanation, representative screenshots, accurate availability, and measurable revision goals.
Understand isolated-world JavaScript, shared DOM, page-main-world bridges, untrusted page data, and lifecycle cleanup for Chrome content-script interfaces.
Create stable Chrome context-menu items on installation, handle clicks in a worker, validate selection data, and avoid assuming the menu grants every capability.
Design PostgreSQL ownership, constraints, timestamps, relationships, and query-driven indexes, then plan migrations that preserve existing application behavior.
Trace route-level client imports, remove unnecessary browser dependencies, defer optional tools, and verify initial and interaction costs after bundle changes.
Place Next.js authentication, session verification, record authorization, and public projections in a server data layer while keeping proxy redirects as navigation aids.