网站检查用户是否安装了客户端应用程序的最佳方式是什么? [英] What is the best way for a website to check if a user has installed a client app?
问题描述
- 如果网站没有安装应用程序,请更改网站如果他们在几台机器上安装了应用程序,请确定他们正在浏览哪台机器。
- / ul>
我希望能够在任何主流浏览器上使用Windows和OSX。 Linux是一个奖金。
一些想法:
- 网站可以检测您是否有Flash安装。这是如何工作的,是否可以用于我的两个目标?
- 我可以让客户端在本地主机上服务HTTP,并执行一些JavaScript请求来获取本地ID?我知道谷歌桌面搜索做了这样的一点。这是一个标准的做法?
感谢!
解决方案您可以从桌面应用程序注册协议(请参阅这个)。例如,这可以用来从网站的任意数据打开您的桌面应用程序。然后,你可以让你的桌面应用程序发送一个HTTP请求到你的网络服务器,告诉它你在哪个机器上。
Let's say I've got a website that works better if a client has installed and logged into a desktop application. I'd like to be able to do 2 things:
- Alter the website if they haven't installed the app (to make it easy for them to find a link to the installer)
- If they've installed the app on a couple of machines, determine which machine they are browsing from
I'd like something that works on Windows and OSX, on any of the major browsers. Linux is a bonus.
A few thoughts:
- Websites can detect if you've got Flash installed. How does that work and could it be used for both of my goals?
- Could I just let the client serve HTTP on localhost and do some javascript requests to fetch a local ID? I know google desktop search did something like this at one point. Is this a standard practice?
Thanks!
解决方案You can register a protocol from your desktop application (see this). This can be used, for example, to open your desktop application with arbitrary data from the website. You could then have your desktop app send a HTTP request to your webserver, telling it what machine you are on.
这篇关于网站检查用户是否安装了客户端应用程序的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!