Source: www.amitmerchant.com

Detect device’s OS in JavaScript

Category: PHP, javascript

A blog on PHP, JavaScript and more Amit Merchant · June 2, 2020 · ⋆ JavaScript There comes a scenario when you might want to check which operating system the device is running.

The navigator object holds the significant amount of device information such as appName, appCodeName, platform, userAgent and so forth. Among all these, you can utilize the userAgent property which holds the information regarding the browser and the operating system it’s running on.

As you can see, it return the information regarding my current browser but most importantly it has also returned the OS.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners