Detect Safari using jQuery

前端 未结 13 1610
面向向阳花
面向向阳花 2020-11-27 10:09

Though both are Webkit based browsers, Safari urlencodes quotation marks in the URL while Chrome does not.

Therefore I need to distinguish between these two in JS.

13条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 10:33

    I use to detect Apple browser engine, this simple JavaScript condition:

     navigator.vendor.startsWith('Apple')
    

提交回复
热议问题