The theorem has been expressed colloquially as “you can’t comb a hairy ball flat without creating a cowlick” or “you can’t comb the hair on a coconut”.

  • jagged_circle@feddit.nl
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    3 days ago

    That’s a terrible idea. Because many users change their user agent for security.

    No, you can’t expect to detect what devices someone has. That’s the thought process of an inexperienced dev.

    • nogooduser@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      3 days ago

      They already do this to redirect from the desktop view to the mobile view so they could do it the other way but don’t for some reason.

      If a user changes their user agent to something that would cause a site to not be able to determine whether they are on desktop or mobile then they can expect that some sites aren’t going to work well.

      • jagged_circle@feddit.nl
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 days ago

        The problem is that the site tries to detect the device type. If you let the user choose it and make it sticky by domain, you dont have that issue.

        • nogooduser@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          3 days ago

          But your users have the problem that they go to the wrong site if someone on a mobile device shares a link when you’re on desktop.

          It just seems inconsistent for them to detect mobile devices but not desktop devices.