Determine whether the UserAgent is from and whether the UserAgent is from
Iso:
Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554a MicroMessenger/6.2.4 NetType/WIFI Language/zh_CN
Android:
Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; PE-TL20 Build/HuaweiPE-TL20) AppleWebKit/533.1 (KHTML, like Gecko) version/4.0 MQQBrowser/5.4 TBS/025440 Mobile Safari/533.1 MicroMessenger/6.2.5.53 _ r2565f18.621 NetType/WIFI Language/zh_CN
After obtaining the UserAgent, you only need to determine whether the string contains "MicroMessenger"
C # judgment:
If (Request. UserAgent. ToLower (). Contains ("micromessenger") {// if it is a source}
Js judgment:
If (window. navigator. userAgent. toLowerCase (). indexOf ("micromessenger") {console. log ("OK ");}
At the same time, you can make other judgments, such as the operating system, and execute different codes according to different operating systems...