使用母版页代码识别操作系统,然后提示安装移动应用程序 [英] Identify OS using masterpage code then prompt for installation of mobile app

查看:74
本文介绍了使用母版页代码识别操作系统,然后提示安装移动应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在面向外部网站(匿名访问)的前提下使用SharePoint2013.我们想在母版页中添加代码以标识用户的操作系统.如果他们使用的是iOS,那么我们鼓励他们安装我们的移动设备 通过证明吐司指示器或类似工具在Apple App Store中使用该应用程序.谁能提供从何处开始的建议/指导/说明?

We're using SharePoint 2013 on premises for our external facing website (anonymous access).  We'd like to add code to the masterpage to identify the user's OS.  If they are using iOS, then we'd like to encourage them to install our mobile app from the Apple App Store by proving a toast indicator or something similar.  Can anyone provide advice/direction/instructions on where to start with something like this?

推荐答案

用户代理字符串通常包含操作系统信息...

The user agent string often includes operating system info...

Key Value User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko/20100101 Firefox/12.0

在此处进行测试: http://www.useragentstring.com/

或使用浏览器中的F12工具.

or by using the F12 tools in your browser.

 


这篇关于使用母版页代码识别操作系统,然后提示安装移动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆