惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
J
Java Code Geeks
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
B
Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
美团技术团队
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
N
Netflix TechBlog - Medium
C
Check Point Blog
Recent Announcements
Recent Announcements
博客园 - Franky
博客园 - 叶小钗
T
Tailwind CSS Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building Privacy-First Browser Extensions: What I Learned
Weather Cloc · 2026-05-04 · via DEV Community

When I built Weather & Clock Dashboard for Firefox, I made a decision early on: no analytics, no accounts, no external calls except weather data.

Here's what I learned about building browser extensions with privacy as a design principle — and why I think more extension developers should take this approach.

The Default is Data Collection

Most web development assumes you want to know who your users are. Analytics platforms are one npm install away. A/B testing, session recording, funnel analysis — the infrastructure for surveillance capitalism is baked into the default developer tooling.

Browser extensions are in a privileged position. They run inside the browser, they can see your tabs (with permission), they load on page visits. An extension with analytics has more access to your behavior than a typical website.

What Privacy-First Actually Means

For my extension, I set these constraints:

1. No analytics scripts
2. No external requests except weather API (user-configured, optional)
3. No user accounts
4. No localStorage of personally identifiable information
5. MIT licensed — code is auditable

Enter fullscreen mode Exit fullscreen mode

The localStorage Rule

The extension stores settings: your preferred city, timezone list, theme preference. But these settings live only in your browser, via browser.storage.local.

// Storing user preference — this stays on-device
await browser.storage.local.set({
  city: userInput,
  theme: 'dark',
  clocks: [{ zone: 'America/New_York', label: 'NYC' }]
});

Enter fullscreen mode Exit fullscreen mode

This data never leaves the browser. It can't. There's no server to send it to.

The Weather API Problem

Weather is a hard case. To show current weather, you need to call an external API — there's no way around it. That external API will see your IP address.

My solution: require users to bring their own API key. Weather & Clock Dashboard uses OpenWeatherMap's free API tier. Users create their own account and enter their own API key.

This means:

  • I have zero knowledge of what city any user is in
  • OpenWeatherMap has a direct relationship with the user (their own account)
  • I have no API key to revoke if I need to shut down a server

The tradeoff: higher setup friction. Some users bounce when they see "enter API key." That's a cost I'm willing to pay.

The AMO Review Benefit

Mozilla's Add-ons review process (for Firefox) actually rewards privacy-respecting extensions. Reviewers check:

  • What permissions the extension requests
  • What external requests it makes
  • Whether the permissions are necessary for the stated functionality

An extension that requests <all_urls> permission but only needs to show weather will get questions. An extension with no permissions beyond storage sails through.

The User Trust Payoff

Privacy-first design communicates trust before users read a single word of your privacy policy. When I see an extension that:

  • Requires no account
  • Requests minimal permissions
  • Is open source
  • Has been reviewed by Mozilla

...I trust it immediately. That trust is the product.

For extensions specifically, trust is the moat. Users install things that run inside their browser. The bar for trust should be high.

The Technical Implementation

Here's the manifest for Weather & Clock Dashboard — notice what permissions are and aren't requested:

{
  "manifest_version": 3,
  "permissions": [
    "storage"
  ],
  "chrome_url_overrides": {
    "newtab": "dashboard.html"
  }
}

Enter fullscreen mode Exit fullscreen mode

No tabs, no history, no <all_urls>. Just storage to save preferences. That's the entire permission surface.

Analytics Without Surveillance

I do want to know how many people are using the extension. AMO's install count is my only metric, and it's coarse. I can see total installs and a weekly active user count — nothing more granular.

For a lot of developers, this is unacceptable. How do you optimize UX without knowing which features are used? How do you prioritize roadmap?

My answer: user feedback channels (GitHub issues, AMO reviews) and intuition. It's less data-driven. I'm okay with that.

Open Sourcing as a Privacy Signal

MIT licensing and public source code is a form of privacy documentation that no privacy policy can match. Users can verify that the code does what it claims. Researchers can audit it. Security professionals can check for vulnerabilities.

The source code is on GitHub. I'm comfortable with anyone reading it.

Conclusion

Building privacy-first isn't a technical constraint — it's a design decision made before you write the first line of code. The constraint is deciding what you won't collect, not figuring out how to anonymize what you do.

For browser extensions especially, privacy-first design is also good product design. Users are rightfully suspicious of extensions. Being genuinely privacy-respecting — not just claiming to be — is a real differentiator.

Install Weather & Clock Dashboard if you want to see this in practice.