v146 · Security · Intervention Demo
Intervention Demo
Checks the current PermissionStatus for key permissions on this page. Chrome 146's intervention may have auto-denied some if this site repeatedly prompted after denials.
The intervention is invisible to sites — a silenced permission request returns
state: 'denied' exactly like a user-initiated denial. The only way to tell is by noticing that no prompt was shown. Chrome shows a chip in the address bar to inform users when an automatic denial occurred.
current permission states
notifications
—
camera
—
microphone
—
geolocation
—
best practices to avoid intervention
What well-behaved sites do
- ✓Check
permissions.query()before prompting — only prompt when state is'prompt' - ✓Only ask for permissions in response to a clear user action (button click, not page load)
- ✓When denied, explain the feature and how to re-enable in browser settings — don't re-prompt immediately
- ✓Offer the feature's core functionality without the permission when possible
- ✗Never re-prompt within the same session after a denial
- ✗Never show a prompt on page load or before the user has interacted with the relevant feature
- ✗Never loop — prompting again immediately if the user dismisses without choosing
checking permission before prompting
async function requestNotificationsCarefully() {
// Always query first — Chrome 146 may auto-deny if site was flagged
const status = await navigator.permissions.query({ name: 'notifications' });
if (status.state === 'granted') {
// Already have permission
return true;
}
if (status.state === 'denied') {
// User (or intervention) has denied — do NOT re-prompt
showSettingsLink('To enable notifications, click the lock icon in the address bar');
return false;
}
// state === 'prompt' — safe to request
const result = await Notification.requestPermission();
return result === 'granted';
}