← Back to context

Comment by raincole

3 years ago

> Feature detection is too much power for developers

- People on HN.

Yes, it is too much power for them. Power which they abuse by fingerprinting us. Browser vendors agree with me: they reduced the power of developers by lying to Javascript when they tried to check link styles.

Do you think otherwise?

  • A. Test for window.fetch.

    B. Check if a link is visited.

    Whether these two even remotely fall into the same category is left as an exercise for readers.

  • Using an Abortcontroller with fetch for example is only recently supported. I like to use it where I can, but I don't want to crash on a slightly older browser. Feature detection is absolutely practically useful.

    • I have no doubt that it's useful. My point is it enables abuse towards us and that the potential for abuse overrides the utility.

      Road to hell is paved with good intentions. When you propose a law, you must also think about the numberless ways it could be abused and misused to cause harm. Same principle applies here. The code shouldn't just fail, it should fail in ways that prevent the developer from even knowing it failed much less why. Simply because that would leak information.