Detecting Microsoft's edge or spartan with javascript

前端 未结 5 1451
情深已故
情深已故 2021-01-03 22:15

Is the user agent for Edge or Spartan browsers known already? Can anyone tell me how to detect this browser and diferentiate it from IE in advance of its release?

5条回答
  •  遥遥无期
    2021-01-03 22:45

    A simple google search found me the answer you are looking for: http://forum.piwik.org/read.php?3,125732

    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
    

    Therefore you should match: "Edge\/\d+"

提交回复
热议问题