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

前端 未结 11 2125
盖世英雄少女心
盖世英雄少女心 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:22

    check out browsecap.ini. The linked site has files for multiple scripting languages. The browsecap not only identifies the user-agent but also has info about the browser's CSS support, JS support, OS, if its a mobile browser etc.

    cruise over to this page to see an example of what info the browsecap.ini can tell you about your current browser.

提交回复
热议问题