Languages
[Edit]
EN

JavaScript - detect Apple Safari web browser

3 points
Created by:
Creg
9600

In this short article, we would like to show how using JavaScript, detect Apple Safari web browser on Apple devices.

Quick solution:

Warning:

User-Agent can be changed by advanced user that makes lead to some errors - if it may be your case, check alternative solution too.

 

Alternative solution

Edit

In this solution, we test only user agent to detect web browser.

Warning:

Apple Safar web browser was released last time on Windows in 2012, that makes why we do not consider other platforms in the above logic.

 

Example test

Edit

 

See also

Edit
  1. JavaScript - detect Apple device
  2. JavaScript - detect mobile device

  3. Install Apple Safari web browser on Windows
  4. Google Chrome change User-Agent permanently

  5. Example User-Agent values

Alternative titles

  1. JavaScript - test if Apple Safari web browser is used
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join