Skip to Content
Platform.Ontology

Vibrate the device

Triggers the phone's vibration motor in short pulses.

Does something on your deviceThings a page can doDevice outputWeb browsersWhile you use it

In one line

Can buzz the phone in short pulses, after you have tapped the page

Triggers the phone's vibration motor in short pulses.

A site can buzz the device for feedback or alerts. It is Android only, needs a tap first, and cannot run from hidden frames or background tabs.

What it can and can't do

What the user does: You tap a button, win a game, or touch the page before it buzzes.

It can

  • Buzz your Android phone in a pattern after a tap
  • Stop a buzz it started
  • Give touch feedback in games and timers

It cannot

  • Buzz without any earlier tap on the page
  • Buzz on iPhone, because Safari does not offer it
  • Buzz in current Firefox, which no longer offers it

How it differs between platforms: Android Chrome and Edge allow it. iPhone Safari does not.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported322014-01-14None
EdgeSupported792020-01-15None
FirefoxRemoved1292024-08-06Removed
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported322014-01-15None
Samsung InternetSupported2.02014-10-17None

How a site asks for it

APInavigator.vibrate(pattern)
Browser compat keysapi.Navigator.vibrate
How access is grantedgesture
What the user seesNo prompt (needs a click, tap or keypress)
Needs a secure context (HTTPS)No
Needs a user gestureYes
Activationsticky
How long it lastsOne-shot pattern; cancelled by vibrate(0) or tab hide
How to take it backNothing to revoke (no permission is stored)
Inside an iframeBlocked in cross-origin iframes without prior activation in that frame (Firefox 72, Chrome 77)

Typical flow

  1. Person taps in the page (sticky activation in the frame)
  2. Page calls navigator.vibrate([200,100,200])
  3. Device vibrates

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • Needs sticky user activation in the frame (Chrome 60); no prompt
  • Pattern limited to 99 entries and 10 s per entry in Chrome (about); longer values truncated
  • Not available in Safari or any iOS browser; Firefox desktop removed it in 129
  • Stops when the tab is hidden or screen locks
  • Hardware intensity cannot be set; only on and off durations

The story

What it is

A site can make your phone buzz in short bursts after you tap.

For you

You tap a button in a web game or app and feel a short buzz. Safari on iPhone does not allow it, so you only feel it on some phones.

For makers

Makers use it for touch feedback that makes a web app feel like a real app. It is cheap and needs no permission, only a recent tap.

Where you see it

TypeExampleApps
gamesA browser racing or shooter game buzzes when you crash or get hit.None named
messagingA web chat app buzzes your phone for a new message when it is open.None named
paymentsA checkout page buzzes once when the payment goes through.None named
fitnessA workout timer buzzes at the end of each set.None named
accessibilityA web app buzzes to confirm a tap for people who cannot see well.None named
securityAn annoying ad may try to buzz the phone to get attention, which Chrome blocks without a tap.None named

Risks

  • Annoying buzzes
  • Battery use

What the platform says

Good uses and abuse

Legitimate uses

  • Haptic confirmation
  • Game feedback

Known abuse

  • Annoyance and battery drain
  • Tactile alerts in scam pages

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2017-07, Chrome 60: Requires user gesture
  • 2019-10, Chrome 77: Cross-origin iframe vibrate needs activation in that frame
  • 2024-08, Firefox 129: Vibration API removed from desktop Firefox

Sources

How well checked: Based on official documentation.

On this page