Cookie已过期SAFARI浏览器 [英] Cookies getting expired for SAFARI browser

查看:378
本文介绍了Cookie已过期SAFARI浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个使用cookie存储登录用户信息的网站工作。

ie当用户登录时,如果他有一个有效的登录名/密码我们创建用户ID,CustID等的cookie将在整个网站中使用,并在用户点击LOGOUT按钮时删除这些cookie。


这样工作正常,但突然间,一组用户已经开始抱怨他们正在收到错误。我查看了错误,发现是因为Cookie过期了。他们都在使用带有MAC机器的SAFARI浏览器。


没有其他用户抱怨这个除了他们。


所以,我相信这种情况正在发生因为SAFARI的cookie过期了。


如果cookie已经过期,我已经向LOGOUT用户实施了一个代码(这可以防止由于cookie导致的价值损失而发生错误)。 />

但是现在他们抱怨他们经常被退出系统。


你能不能告诉我在这种情况下应该做些什么?< br $>
我应该如何防止COKKIES过期?


谢谢...寻找你的回复

解决方案

< blockquote>您是否为Cookie设置了超时?在我看来,问题可能只是如果没有明确说明Safari可能使用较短的默认值的超时值。


Jared


亲爱的Jhardman,


感谢您的回复...


我没有使用明确的值来暂停cookie,但我有创建了自动注销功能。如果用户没有刷新页面45分钟,用户会将用户重定向到Cookie过期的注销页面,用户会从系统中注销。

但是在执行此操作之前,弹出窗口会提醒用户您没有从最后40分钟完成任务,并在5分钟后从父窗口注销(用户已登录的浏览器),请刷新浏览器。


这些用户是使用SAFARI和MAC,在同一个浏览器中的多个选项卡中打开不同页面的网页,并从其中一个选项卡中注销,因此在刷新其他选项卡的页面时会出现错误。


请尽快查看并回复。


SwapnilD


你可以切换到使用会话变量而不是cookie吗?有时那些更安全。


Jared


I''m working for a website which uses cookies to store the logged in user''s information.
i.e. When user log-in, if he has a valid login/password we create cookies for the UserID,CustID and etc..to be used throughout the website and delete those cookies when user clicks LOGOUT button.

This was working fine, but suddenly, a group of users has started complaing that they are getting error. I have reviewed the error and found that it is because of cookies getting expired. They all are using SAFARI browser with MAC machine.

No other user complaning this except them.

So, I believe that this is happening because of cookies getting expired for SAFARI.

I have implemented a code to LOGOUT user if cookie has expired (This can prevent the errors occuring because of value loss due to cookies).

But now they are complaing that they are frequently getting logged out of the system.

CAN YOU SUGGEST ME WHAT TO DO IN THIS SITUATION?
HOW SHOULD I PREVENT COKKIES FROM EXPIRING?

Thanks...Looking for your reply

解决方案

Are you setting a timeout for your cookies? It occurs to me that the issue might just be that if there is no timeout value explicitly stated that Safari might use a shorter default.

Jared


Dear Jhardman,

Thanks for reply...

I''m not using explicit value for cookies to timeout, but I have created auto logout functionality. Which redirects user to the logout page where cookies gets expired and user gets logged out from the system if user has not refreshed page for 45 minutes.
But before doing this a pop up reminds user that you have not done anythng from last 40 minutes and will be logout from the parent window after 5 minutes(browser in which user has logged in), "Please refresh the browser".

These users are using SAFARI with MAC, opening diffrent pages of website in multiple tabs within a same browser and getting logged out from one of the tab hence getting error while refreshing the pages for other tabs.

Please review and reply ASAP.

SwapnilD


could you switch to using session variables rather than cookies? sometimes those are more secure.

Jared


这篇关于Cookie已过期SAFARI浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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