How do I detect what browser is used to access my site?

前端 未结 11 2132
盖世英雄少女心
盖世英雄少女心 2021-01-13 13:51

How do I detect what browser (IE, Firefox, Opera) the user is accessing my site with? Examples in Javascript, PHP, ASP, Python, JSP, and any others you can think of would b

11条回答
  •  南方客
    南方客 (楼主)
    2021-01-13 14:00

    You would take a look at the User-Agent that they are sending. Note that you can send whatever agent you want, so that's not 100% foolproof, but most people don't change it unless there's a specific reason to.

提交回复
热议问题