Hacker News new | past | comments | ask | show | jobs | submit login

Does anyone know of (or work on) an app still doing user-agent sniffing to determine browser features (as in, the sniffing code has been touched in the last ~decade)? If so, why do it that way?



I do.

Lots of `isIOS` and `isSafari` tests in my code. Safari 15 for example cannot correctly apply orientation metadata, and will choke on very big images when using `createImageBitmap` in a thread. No way to find out.

I could probably detect the orientation issue with a small dataURI of an image, but the big image issue is more difficult.


User agent sniffing is still a very typical way to determine whether to send the mobile or desktop version of a site.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: