How to detect browser type and its version

后端 未结 5 1991
借酒劲吻你
借酒劲吻你 2021-02-03 21:54

how can i detect browser type and its version in Rails. I want to put check on the version of specific browser and if its not required browser version than ask user to upgrade i

5条回答
  •  故里飘歌
    2021-02-03 22:43

    What you do is actually the way to do it. Now, you can process the user agent information with a regular expression, looking for matches on Firefox, Chrome or any other browser or version you like.

提交回复
热议问题