English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm currently designing a website.I want this website to has a security element, so i want to implement a session time out. Can someone please guide on how to program a session time out.

2007-02-04 07:44:09 · 1 answers · asked by aida j 1 in Computers & Internet Programming & Design

1 answers

Sessions are typically handled at the server request level. In IIS on a Windows server, the default for a session to end is 20 minutes. You can change it in the IIS control panel. Apache has a similar setting in the configuration files.

Depending on the server-side language you are using, the easiest way is to just set some session variable to something (for example, Session["LoggedIn"] = true). Then on each page, just check to see if Session["LoggedIn"] is null, or exists, or whatever is appropriate for your language. If it is no longer set, that means the session has expired. You can redirect back to your login page.

2007-02-04 08:30:52 · answer #1 · answered by Rex M 6 · 0 0

fedest.com, questions and answers