How to detect apple computers using user-agent ? Safari may be run in windows too
The User-Agent (UA) is a string contained in the HTTP headers and is intended for browser detection: to identify the device/platform of the visiting user, and can be used to determine appropriate content to return.
AppleWebKit/537.36 indicates what browser rendering engine is used. A rendering engine is what transforms HTML into an interactive webpage on the user's screen. The WebKit browser engine was developed by Apple and is primarily used by Safari, Chromium, and all other WebKit-based browsers. (KHTML, like Gecko).
This is perhaps not surprising as both macOS and iPadOS Safari share a common codebase. By contrast, if your browser is configured to request the “Mobile” version of a webpage, it identifies identifies itself as Apple iPad Safari 13.2. So yes, in many cases, websites will think you are “some sort of mac”!
Look for Macintosh in User-Agent, trying this with my Mac browsers:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.27 Safari/536.11
While safari for Windows has "Windows" instead of Macintosh:
Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With