Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

browser feature detection is the way grown up developers have been doing this for several years now. user agent sniffing is dumb because it bundles a ton of assumptions with a high upkeep requirement, all wrapped up in an unreadable regex. It's been bad practice for ages; I'd be surprised if that's how Amazon is doing it still.



> browser feature detection is the way grown up developers have been doing this for several years now.

and how do these grown up developers feature-detect when js is disabled? or are they too "grown up" to deal with anything but the ideal scenario?

> I'd be surprised if that's how Amazon is doing it still.

why don't you go there and open up your "grown up developer" devtools.


If your site doesn't use JS, you don't need features. Just use responsive HTML.


How do you handle browsers that render HTML differently?


the realistic answer to this line of questioning is : "we don't care about the edges because they constitute such a small percentage of the user base."


Use different HTML that renders the same everywhere relevant




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: