在JavaScript中生成(非UDID)标识符以唯一标识iOS设备 [英] Generating a (non-UDID) identifier in JavaScript to identify iOS devices uniquely

查看:123
本文介绍了在JavaScript中生成(非UDID)标识符以唯一标识iOS设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Mobile Safari无法访问iOS设备的UDID,因此我正在寻找一种方法,仅使用JavaScript为iOS设备生成不同(但仍然唯一)的标识符。

As Mobile Safari does not have access to the iOS device's UDID, I'm looking for a way to generate a different (but still unique) identifier for iOS devices using JavaScript only.

更广泛的问题是:


Mobile Safari上的JavaScript可以访问哪些系统信息可用于生成唯一标识符?

"What system information does JavaScript on Mobile Safari have access to that could be used to generate a unique identifier?"

这需要是不需要用户权限(即警报)才能访问的信息。

This would need to be information not requiring user permissions (i.e. alerts) to access.

此用例是跟踪CPC发布商的转化,其中广告客户仅限于提供网址作为广告的目标网页,发布商不会将UDID附加到网址。

The use-case for this is tracking conversions from CPC publishers where advertisers are limited to providing a URL as the landing page for the ad, and the publisher does not append the UDID to the URL.

推荐答案

更重要的是,第三方cookie(op暗示他需要设置)被禁用默认情况下在移动Safari上。这里简短的回答是没有简单的方法可以做到这一点,除非你诉诸谷歌参与的那种诡计 - 解决方法涉及一个漏洞,允许第三方cookie通过表单提交设置。谷歌创建了一个隐形表格,并通过JavaScript提交,因此可以设置一个cookie。

More to the point, third-party cookies (which is what the op is implying he needs to set) are disabled by default on mobile Safari. The short answer here is there's no easy way to do this, unless you resort to the kind of trickery Google engaged in - the workaround involves a loophole whereby a third-party cookie was allowed to be set with a form submission. Google created an invisible form and submitted it, all via JavaScript and thus was able to set a cookie.

有些公司声称能够进行设备指纹识别高准确率。 Blue Cava是一个获得大量新闻的人,但谷歌搜索将会出现其他人。如果这个功能非常重要,可以付钱,我建议你查看它们。

There are companies claiming to be able to do "device fingerprinting" with high accuracy. Blue Cava is one getting a bunch of press, but a Google search will turn up others. If this feature is important enough to pay money for, I'd suggest checking them out.

这篇关于在JavaScript中生成(非UDID)标识符以唯一标识iOS设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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