isFirefox()
truewhen the current environment is Mozilla Firefox — stable, Beta, Developer Edition, Nightly — on any platform, including Firefox for iOS (FxiOS/).
| Signature | (options?: DetectOptions) => boolean |
| Matches | Firefox/, FxiOS/ (any platform, any edition) |
Matches
Firefox/— desktop and Android editions.FxiOS/— Firefox on iOS (which is actually WebKit under the hood, but Mozilla branded).
Example
import { isFirefox } from 'get-browser';
if (isFirefox()) {
applyFirefoxOnlyWorkaround();
}
SSR
isFirefox({
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.0; rv:138.0) Gecko/20100101 Firefox/138.0',
});
// → true
See also
detect()isMobile()— Firefox-on-mobile combined check.