Chrome extensions that touch the page have a permission problem that is easy to get wrong: the easiest permission to ask for is also the one users should refuse. A click-to-call extension is a good case study, because it only ever needs to read the page the user is looking at, and yet the obvious implementation asks for every page on the web.
The three ways to get access
Manifest V3 gives an extension three broad routes to page content, and they are not equivalent.
content_scripts with matches: ["<all_urls>"]. The extension injects into every page automatically. It works, it is simple, and it means the extension runs on the user's bank, their webmail and their internal tools from the moment it is installed. The permission warning at install time says the extension can read and change all data on all websites, which is accurate.
host_permissions with <all_urls>. The same breadth, granted explicitly and persistently. Slightly more honest in the manifest, identical in effect.
activeTab plus scripting. The extension gets temporary access to the current tab after a user gesture: a click on the toolbar icon, a keyboard shortcut, a context-menu item. No install-time warning about reading all sites, no persistent access, and the grant expires when the tab navigates away.
For a feature that only needs the page in front of the user, the third option is enough, and the difference in what the user is trusting is large.
Where activeTab runs out
activeTab is not a general-purpose replacement for host permissions, and pretending otherwise produces extensions that quietly do nothing.
- It requires a gesture. If the extension is supposed to notice phone numbers as the page loads, with no click,
activeTabalone will not fire. - It covers one tab, one origin, until navigation. A background worker cannot go back and re-scan a tab later without a new gesture.
- Cross-origin iframes inside the page are not included in the grant.
The honest middle ground is optional host permissions: declare optional_host_permissions, then ask per site, at the moment the user wants the feature there, with a sentence that explains what will be read. Chrome shows a normal permission prompt scoped to that origin, and the user can revoke it from the extensions page later.
What a careful manifest looks like
A click-to-call extension that follows this shape declares:
-
activeTabandscripting, so a click on the icon can scan the current page. -
optional_host_permissions: ["http://*/*", "https://*/*"], requested per origin only when the user turns on automatic detection there. -
sidePanelor a popup for the UI, which needs no page access at all. - No
tabspermission.tabsis often added by reflex; it exposes URLs and titles of every tab and is rarely needed. - No
<all_urls>incontent_scripts.
Then the code has to honour it. Detection runs on the DOM of the granted tab, not in a background loop over every tab. Nothing is sent anywhere, because there is no server to send it to; the extension's job ends at handing a tel: or sms: URI to the operating system.
Why this matters beyond the permission prompt
The install-time warning is the only security information most users will ever see about an extension. If it says "read and change all your data on all websites", the user has been told the truth, and a lot of them will decline. If it says nothing about page access, the extension had better actually work that way.
There is a second-order effect too. Extensions with broad host permissions are the ones that break when a site's CSP changes, get flagged by enterprise policy, and show up in incident reports when a supply-chain compromise turns a benign extension into a data collector. Narrow permissions do not prevent that, but they bound the damage to the sites a user explicitly turned the feature on for.
A short checklist
- Start from
activeTab. Add optional host permissions only for the sites where the feature has to run without a click. - Never add
tabsunless you can name the field you need from it. - Request per-origin access at the moment of use, and explain it in one sentence in the UI.
- Keep the processing local. If the extension has no network code, say so, and make sure the manifest agrees: no
host_permissionsfor an API you do not call. - Test the revoke path. A user who removes the site permission should get a working extension that simply stops scanning that site, not a broken popup.
The permission model is the product decision, not a detail to settle at the end.
Disclosure: I maintain DialGlide, a free, open-source (MPL-2.0) Chrome extension that turns phone numbers on pages into tel:, sms:, sip: and custom dialer links, and I prepared this post with AI assistance. The article is about the permission model, not the extension; no link is included on purpose.

