alt text

Caption

Web dev: What browser is visiting the page?

User agent string:

A screenshot of a browser. The URL bar reads firefox://settings, a button on the URL bar is labelled Netscape, a popup from the button reads: “You’re viewing a secure Opera page”, and the web page title reads “Chrome settings”.

  • elrik@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 hours ago

    User agents are useful for checking if the request was made by a (legitimate self-identifying) bot, such as Googlebot.

    It could also be used in some specific scenarios where you control the client and want to easily identify your client traffic in request logs.

    Or maybe you offer a download on your site and you want to reorder your list to highlight the most likely correct binary for the platform in the user agent.

    There are plenty of reasonable uses for user agent that have nothing to do with feature detection.