浏览器升级网页重定向和隐私模式 [英] Browser-upgrade-page redirect vs. privacy mode

查看:144
本文介绍了浏览器升级网页重定向和隐私模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在我正在建立的网站上执行功能检测,但客户坚持使用旧版浏览器的用户显示一个升级页面(对不起,您的浏览器已过时,请访问XYZ网站下载较新版本),然后才能使用该网站。在他们看到升级页面后,网站不会再向该用户显示。

We are doing feature detection on a site I'm building, but the client insists users with older browsers be shown an upgrade page ("sorry, your browser is outdated, please visit XYZ site to download a newer version") once before they can use the site. After they've seen the upgrade page, the site will not show it again to that user.

如果用户代理是旧浏览器,这将是一个临时重定向。重定向只会在用户系统上没有某个Cookie时发出(HasSeenUpgradePage或某事)

This will be a temporary redirect if the user agent is an old browser. The redirect will only be issued if a certain cookie is not on the user's system ("HasSeenUpgradePage" or something)

我建议在每个页面上显示顶部横幅,

I suggested a top banner on each page, or a once-only top banner, but my client insists and I like getting paid.

我担心它会打破网站,让用户在隐私模式下查看。

I'm concerned it'll break the site for people viewing in privacy mode.

我可以做些什么来识别用户在隐私模式下的会话吗? (我希望关闭浏览器并重新打开,以便用户再次看到升级页面,这没有问题)

Is there something I can do to recognize a user's session in privacy mode? (I'd expect closing the browser and reopening it to result in the user seeing the upgrade page again, that's no problem)

谢谢!

推荐答案

据我所知,以隐私模式查看网站并不意味着cookies被禁用,这意味着Cookie和浏览历史记录

As far as I am aware, viewing a site in Privacy Mode does not mean that cookies are disabled, all it means is that cookies and browsing history from that session will not be saved once the windows is closed.

因此,如果您的用户浏览网站,您可以存储一个cookieHasSeenUpgradePage并检查该会话。当他们关闭浏览器并再次返回您的网站时,您将必须再次进行检查。这将是与在隐私模式下登录Facebook或Gmail时一样的功能,他们将在您的登录会话中使用Cookie。

So if your user is browsing the site, you can store a cookie "HasSeenUpgradePage" and check that for that session. When they close the browser and come back to your site again you will have to do the check again. This would be the same functionality as if you logged into Facebook or Gmail whilst in privacy mode, they will use cookies for your login session.

隐身模式(在Provate中浏览)

该网页的重要报价:

所有新的Cookie都会在*关闭所有无痕式视窗后已打开。

这篇关于浏览器升级网页重定向和隐私模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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