DamonOehlman / detect-browser

Unpack a browser type and version from the useragent string
MIT License
687 stars 102 forks source link

Module doesn't detect safari/ios when opened from the spring board (save site to springboard) #34

Open dannybloe opened 7 years ago

dannybloe commented 7 years ago

The useragent is slightly different when run from the springboard.

5punk commented 7 years ago

@dannybloe Can you post a sample of the user agent string?

EddieOne commented 6 years ago

Sorry, it's a screenshot. I guess it is the whitespace after the version causing the issues. I'm not great at regex though.

image

EddieOne commented 6 years ago

Ah I think I spotted the issue. I believe Chrome is being wrongly identified with Safari. This page has all the details. https://developer.chrome.com/multidevice/user-agent

DamonOehlman commented 4 years ago

Is this still an issue, I used the user agent above to do some testing and it appears to get correctly detected as a safari browser on MacOS (which looks correct).

UA string used (as text):

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/601.7.8