Screen orientationBaseline · Widely available
The screen.orientation API gets information about the orientation of the viewport, such as landscape or portrait. With this API, you can adapt an application's layout or behavior in response to changes in orientation.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 27, 2023. Widely available since Sep 27, 2025.
Browser support
DesktopChrome
1–37Not supported
38+Supportedsince Oct 7, 2014
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–42Not supported
43+Supportedsince Dec 15, 2015
Current: 157Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27MobileChrome Android
18–38Not supported
39+Supportedsince Nov 12, 2014
Current: 155Firefox Android
4–42Not supported
43+Supportedsince Dec 15, 2015
Current: 157Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: orientation.
Feature detection
JS · check before using
if ("ScreenOrientation" in globalThis) {
// ScreenOrientation is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Screen.orientation | 38 | 79 | 43 | 16.4 | 39 | 43 | 16.4 |
| ScreenOrientation | 38 | 79 | 43 | 16.4 | 38 | 43 | 16.4 |
| ScreenOrientation.angle | 38 | 79 | 43 | 16.4 | 38 | 43 | 16.4 |
| ScreenOrientation.change_event | 38 | 79 | 43 | 16.4 | 38 | 43 | 16.4 |
| ScreenOrientation.type | 38 | 79 | 43 | 16.4 | 38 | 43 | 16.4 |