简体   繁体   English

Jquery重定向到登录页面

[英]Jquery redirect to login page

I've been using ASp.NET to handle post back operations, but i'm now starting to plug in more and more cool JQuery stuff. 我一直在使用ASp.NET来处理回发操作,但我现在开始插入越来越多很酷的JQuery东西。 I use e.PreventDefault on all my methods, to stop .aspx pages from reloading on click of buttons, or paging. 我在所有方法上使用e.PreventDefault,以便在点击按钮或分页时停止重新加载.aspx页面。

I've run into a problem, where i need to force the end user back to the login page when the cookie time out has reached. 我遇到了一个问题,我需要在达到cookie超时时强制终端用户返回登录页面。

How can I check that this has expired, and then force the users to login again? 如何检查这已过期,然后强制用户再次登录?

JQuery's library doesn't contain any functions to look at COOKIES but here is a plugin that you can add that handles COOKIES variables. JQuery的库不包含任何查看COOKIES的函数,但这里是一个可以添加处理COOKIES变量的插件。

http://www.electrictoolbox.com/jquery-cookies/ http://www.electrictoolbox.com/jquery-cookies/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM