Skip to content

Concept in Capabilities

Local Network Access

Published Updated

Limited availabilityNot supported in Firefox (Desktop), Firefox (Android), Safari (macOS), Safari (iOS)WICG draft

Local Network Access is a browser permission that lets a public web page send requests to a device on the user’s local network, such as a router, printer, or dev server, or to the machine itself. There is no API to request the permission directly. The page’s first fetch(), subresource load, or iframe navigation to such an address triggers the prompt, and a denied prompt fails the request. The main script-visible surface is the targetAddressSpace option on fetch() and Request, which declares where a request is going so that the browser can exempt it from mixed-content blocking. The explainer also plans Permissions API integration so a page can read the grant status.

Chrome 142 shows the prompt by default; from Chrome 138 it was opt-in through chrome://flags/#local-network-access-check set to “Enabled (Blocking)”. The Request.targetAddressSpace compatibility data records support from Chrome 142 and no support in Firefox, Safari, or Android WebView. The design replaced Private Network Access, which gated the same requests on a CORS preflight that the local device had to answer and which Chrome put on hold.

The specification assigns IP addresses to three address spaces. These are loopback (127.0.0.0/8, ::1/128, 0.0.0.0/32, ::/128, 198.18.0.0/15), local (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 carrier-grade NAT, 169.254.0.0/16 link-local, fc00::/7, fe80::/10, fec0::/10, 0.0.0.0/8, and the IPv6 documentation prefixes 2001:db8::/32 and 3fff::/20), and public for everything else. An IPv4-mapped IPv6 address (::ffff:0:0/96) takes the space of its embedded IPv4 address. A local network request targets a less public space than the requesting document. This includes public to local or loopback, as well as local to loopback.

Two policy-controlled features gate those requests, each with a default allowlist of 'self': local-network for requests to a local address and loopback-network for requests to a loopback address. The older single name local-network-access remains in Chromium as an alias for both, including in Permissions-Policy headers and iframe allow attributes. A cross-origin iframe that needs the capability therefore has to be embedded with allow="local-network" for local addresses, allow="loopback-network" for loopback ones, or allow="local-network-access" for both; without delegation its requests fail without a prompt. Only secure contexts can hold the permission, so a public page served over http:// is blocked. Chromium temporarily exempts non-secure pages that already sit on the local network from reaching localhost (§ 4.4 of the specification).

Because many local servers do not run HTTPS, which the specification calls hard or sometimes impossible to fix, it exempts a request from mixed-content checks when the browser can tell before DNS resolution that it is a local network request. This applies when the hostname is a private IP literal (http://192.168.0.1/), the hostname ends in .local, or the call carries targetAddressSpace: "local" or "loopback". The declaration is checked after the connection is made; if the resolved address is not in the declared space, the request fails and cannot silently become a public request. A public hostname that happens to resolve to 192.168.0.1 is still mixed content unless the call is annotated.

Chrome applies the check to fetch(), subresource loads (<img>, <script>, CSS), and iframe navigations, and to service and shared workers only once a document on the same origin has already been granted the permission (the worker cannot prompt; crbug.com/404887282 tracks a fix). At the Chrome 138 opt-in stage WebSocket, WebTransport, and WebRTC connections were not yet gated (crbug.com/421156866, crbug.com/421216834, crbug.com/421223919). Chrome’s first milestone gates only requests that start from a public address; a local origin such as https://router.local calling another local device, or calling loopback, is not yet prompted for, which the Chrome blog lists as a planned extension.

Diagnose a missing local-network permission

Section titled “Diagnose a missing local-network permission”

If DevTools reports ERR_LOCAL_NETWORK_PERMISSION_MISSING, check the site’s local-network permission first. Chromium defines this separately from ERR_BLOCKED_BY_LOCAL_NETWORK_ACCESS_CHECKS; a rejected fetch() alone does not identify which check failed. Follow the local-network error checks to distinguish permissions, iframe policy, address-space declarations, and CORS before changing device settings.

Both examples run in an https:// page. Because the prompt is tied to the request itself, each one treats a rejected fetch() as the expected outcome and shows the user a manual path instead of retrying.

Reading a router status page from an installed PWA

Section titled “Reading a router status page from an installed PWA”

'targetAddressSpace' in Request.prototype is a quick test for the option, which BCD dates to Chrome 142. Where it is absent (Firefox, Safari, Chrome before 142) the request is plain mixed content from an HTTPS page and the browser blocks it before any network activity. Chrome 138 to 141 apply the checks and the exemption for private IP literals and .local only when a user has enabled chrome://flags/#local-network-access-check (Chrome blog). The fallback below opens the device’s own page in a new tab, where no cross-origin request is involved.

const ROUTER = 'http://192.168.1.1/status.json';
function browserGatesLocalNetwork() {
return typeof Request !== 'undefined' && 'targetAddressSpace' in Request.prototype;
}
async function readRouterStatus() {
if (!window.isSecureContext || !browserGatesLocalNetwork()) {
return { ok: false, reason: 'unsupported' };
}
try {
const res = await fetch(ROUTER); // IP literal: mixed content exempt, prompt shown once
if (!res.ok) return { ok: false, reason: `http-${res.status}` };
return { ok: true, status: await res.json() };
} catch {
return { ok: false, reason: 'blocked-or-offline' }; // denied prompt, CORS, or device down
}
}
document.querySelector('#check-router').addEventListener('click', async () => {
const result = await readRouterStatus();
if (!result.ok) {
window.open('http://192.168.1.1/', '_blank', 'noopener');
return;
}
renderStatus(result.status);
});

A denied prompt, a CORS failure on the device, and an unplugged router all produce a TypeError from fetch(). You can log the error, but it does not tell these causes apart. The explainer says the permission will be readable through the Permissions API, which is the route to branching on a denied grant.

Declaring the address space for a hostname that resolves locally

Section titled “Declaring the address space for a hostname that resolves locally”

A public hostname such as devbox.example.com that resolves to 10.0.0.5 is not exempt from mixed content on its own. Annotating the call with targetAddressSpace: "local" makes the browser allow the http:// connection and then verify that the resolved address really is local. In browsers that lack the option the unknown RequestInit member is ignored, so the same call falls back to being blocked as mixed content; the code therefore offers an https:// alternative when the option is missing.

async function callDevBox(path) {
const supportsOption = 'targetAddressSpace' in Request.prototype;
const url = supportsOption
? `http://devbox.example.com${path}`
: `https://devbox.example.com${path}`; // needs a valid certificate on the device
const init = supportsOption ? { targetAddressSpace: 'local' } : {};
const res = await fetch(url, init);
return res.json();
}
callDevBox('/api/health').catch((err) => {
document.querySelector('#devbox-note').textContent =
`Could not reach the dev box (${err.name}). Check that you are on the office network.`;
});

If devbox.example.com later moves to a public IP, the annotated request fails with ERR_BLOCKED_BY_LOCAL_NETWORK_ACCESS_CHECKS. This prevents the request from leaking to the internet, which is the point of the declaration.

Specifications

SpecificationStatus
Local Network Access (Request.targetAddressSpace)WICG draft
Local Network Access: permission promptWICG draft
Local Network Access: IP address spaceWICG draft
  • Legend
  • Yes
  • Partial
  • Flag
  • No
  • Unknown
Browser / PlatformSupportVersionsConfidenceSourceNotes
Chrome (Desktop)#Yes142highsource—
Chrome (Android)#Yes142highsource1
Edge (Desktop)#Yes142highsource2
Firefox (Desktop)#No—highsource3
Firefox (Android)#No—highsource45
Safari (macOS)#No—highsource6
Safari (iOS)#No—highsource78
Samsung Internet#Yes30.0highsource9
WebView (Android)#No—highsource10
  1. Derived by browser-compat-data mirroring from Chrome.
  2. Derived by browser-compat-data mirroring from Chrome.
  3. No Firefox support is recorded in browser-compat-data.
  4. No Firefox for Android support is recorded in browser-compat-data.
  5. Derived by browser-compat-data mirroring from Firefox.
  6. No Safari support is recorded in browser-compat-data.
  7. No Safari on iOS support is recorded in browser-compat-data.
  8. Derived by browser-compat-data mirroring from Safari.
  9. Derived by browser-compat-data mirroring from Chrome Android.
  10. No WebView Android support is recorded in browser-compat-data.

Source data: /compatibility/local-network-access.json · Global usage: 75 % (StatCounter 2026-09, CC BY-SA 4.0)

Source: spec · MDN · Last verified 2026-10-28 · Confidence: high (computed from sources)