How to set a browser timeout?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Ir0nSpIkE
Forum Newbie
Posts: 7
Joined: Mon May 16, 2005 4:25 pm
Location: On the Island, BC Canada

How to set a browser timeout?

Post by Ir0nSpIkE »

Hi

I’m working on a project that requires users of the site to login. As part of the requirements they want after set amount of inactivity that the page should “Timeout” and automatically display the login page.

This would be easy if I could use JavaScript, but again as part of the security requirements they have disabled all browser side processing. Oh, one more thing, the client is using IIS on a Windows server.

It there a solution to this? Thanks in advance for any suggestions.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

is php installed?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: How to set a browser timeout?

Post by RobertGonzalez »

Ir0nSpIkE wrote:Hi

I’m working on a project that requires users of the site to login. As part of the requirements they want after set amount of inactivity that the page should “Timeout” and automatically display the login page.

This would be easy if I could use JavaScript, but again as part of the security requirements they have disabled all browser side processing. Oh, one more thing, the client is using IIS on a Windows server.

It there a solution to this? Thanks in advance for any suggestions.
In short, the answer is no. the server serves up pages and then forgets about them. It could care less how long ago the page you are on was served. It will care about whether the next page served is within an appropriate amount of time to maintain session state, but it doesn't know that until the request for that page comes in. The only way to achieve a page based time detection is within the browser since the browser is concerned with the page you are on, while the server is not.
User avatar
Ir0nSpIkE
Forum Newbie
Posts: 7
Joined: Mon May 16, 2005 4:25 pm
Location: On the Island, BC Canada

Re: How to set a browser timeout?

Post by Ir0nSpIkE »

Everah wrote:In short, the answer is no.
Thanks. What I was thinking exactly, but I thought I should double check with those more knowledgeable than I before I tell my boss.
Post Reply