Skip to Content
Platform.Ontology

Vibration

Makes the phone buzz in a pattern.

Does something on your deviceHardware and accessoriesHapticsWeb browsersWhile you use it

In one line

Can buzz the phone in a pattern, after you have tapped on the page

Makes the phone buzz in a pattern.

Gives tactile feedback only; it cannot read anything. Sites can annoy people or use it for cues, but it also signals the device is a phone.

What it can and can't do

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

It can

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

It cannot

  • Buzz before you have tapped 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-06Until Firefox 26 included, when the vibration pattern was too long or any of its elements too large, Firefox threw an exception instead of returning <code>false
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported322014-01-15Beginning in Chrome 55, this is not supported in cross-origin iframes. Beginning in Chrome 60, this method requires a user gesture. Otherwise it returns <code>f
Samsung InternetSupported2.02014-10-17Beginning in Chrome 55, this is not supported in cross-origin iframes. Beginning in Chrome 60, this method requires a user gesture. Otherwise it returns <code>f

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 prior tap on the page
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsNone
How to take it backMute device
Inside an iframeNeeds user activation in the frame (sticky activation)

Typical flow

  1. User taps
  2. Call navigator.vibrate([200,100,200])

Data you get

Shape: none

FieldTypeUnitRangePrecision
patternlistmsarray of up to 10 durations; each up to 10000 msChrome clamps

Technical limits

  • Needs a prior tap on the page
  • Android only in practice; ignored on iOS
  • No effect with ringer off on some devices

The story

What it is

A site can make your phone buzz in a pattern after a tap.

For you

A short buzz confirms a tap or warns you about something in the page. Safari on iPhone does not allow it.

For makers

Makers add buzz for touch feedback, alerts and game effects. It works without a prompt but only after you have tapped the page.

Where you see it

TypeExampleApps
gamesA browser shooter buzzes when you are hit, and a racing game buzzes when you bump a car.None named
fitnessA web workout timer buzzes when it is time to switch moves.None named
accessibilityA web app uses short and long buzzes as a code for people who cannot see the screen.None named
deliveryA web ride or food app buzzes when the driver arrives, if the page is open.None named
messagingA web chat buzzes when a message lands while you are in the app.None named
securityA shady page may buzz to trick you into thinking you got a call or alert.None named

Risks

  • Annoying buzzes
  • Alert tricks

What the platform says

Good uses and abuse

Legitimate uses

  • Game feedback
  • Timer alerts

Known abuse

  • Nuisance buzzing

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits0.5Rough identifying entropy, when known

History

  • 2013, Chrome 32: Vibration API ships
  • 2017-01, Chrome 60: Requires user activation
  • 2024-09, Firefox 129: Firefox removes Navigator.vibrate

Sources

How well checked: Checked against real behavior.

On this page