|
Post by account_disabled on Apr 15, 2024 9:43:21 GMT
范网络浏览器 cookie使用的欧洲 cookie 法现已在英国生效。该 cookie 法基于欧盟制定的指导方针。简而言之,法律规定网站在其设备(计算机、手机、iPad 等)上存储 cookie 之前必须获得用户的同意。英国法律和欧盟法规存在很多混乱: 它适用于英国境外的公司吗? 它允许“绝对必要”的 cookie 例外。什么才算数呢?购物车饼干就可以。但是分析呢?登录cookies? 浏览器Cookie解决方案截图 没有明确的答案。英国确实承诺随着时间的推移逐步实施。但如果这项法律获得成功,更多的 cookie 监管即将到来。如果您拥有一个网站,您很可能会在访问者的计算机上放置 cookie,并且您需要遵守。 因此,我们建立了一种简单且免费的方法 科威特 手机号码 来遵守法规。继续阅读以获取代码并在您自己的网站上实施它。 注意:您使用此代码的风险由您自行承担。如果英国发现您违反了他们的法律,我们不承担任何责任。 解决方案 浏览器Cookie解决方案截图 Portent 提出了一个简单的 JavaScript 解决方案来帮助您遵守新的欧洲 cookie 法律。借助位置检测脚本,该脚本会提示欧盟用户同意该网站将 cookie 写入其设备。如果用户同意,则会写入一个 cookie,并将其设置为在 90 天后过期,从而使用户能够完全访问该网站及其通常写入的 cookie。如果用户不同意,脚本会将用户重定向到静态 cookie 同意信息页面。 更新 (8/7/12):我们了解到,大约五分之一的 请求可能会重定向到不需要的页面。这是使用 GeoBytes 地理定位服务免费版本的结果。我在测试中从未遇到过这种情况,但我从未做过任何压力测试。为了避免这种情况,您必须注册 GeoBytes 服务,该服务似乎在每 10,000 个地理定位请求 10 美元的范围内。 浏览器Cookie解决方案截图 脚本:上代码 复制上面的脚本代码并创建一的文件。然后,确保在您网站的每个写入 cookie 的页面上包含 javascript 文件。这很可能是所有这些,特别是如果您在整个网站上进行分析跟踪。
|
|