Browser-upgrade-page redirect vs. privacy mode

你。 提交于 2019-12-24 09:52:43

问题


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.

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)

Thanks!


回答1:


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.

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.

Igcognito Mode (Browse in Provate)

The important quote from that page:

All new cookies are *deleted after* you close all incognito windows that you've opened.



来源:https://stackoverflow.com/questions/16577260/browser-upgrade-page-redirect-vs-privacy-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!