View Full Version : a script to make a page expire
pumpkin1975
05-18-2005, 04:17 PM
was wondering if anyone could help with the following please.
Is there a piece of script that will allow me to make a page 'expire' after a certain time period, or after a specific date?
Cheers
ronaldb66
05-18-2005, 04:42 PM
What exactly do you mean by "expire"?
Once it is downloaded to a client it's basically out of your hands.
mark87
05-18-2005, 06:44 PM
I think he means if you leave the page too long or click an out of date link and it says the page has expired - seen it on some shopping sites before. Not sure how to do it though - php ?
Basscyst
05-18-2005, 11:32 PM
You could use javascript to run a timer to expire and redirect after a certain amount of inactivity.
Basscyst
NancyJ
05-18-2005, 11:49 PM
I think he means if you leave the page too long or click an out of date link and it says the page has expired - seen it on some shopping sites before. Not sure how to do it though - php ?
Its quite simple, you store anything in a session variable and then check for that variable when the page is loaded. If its empty then the session expired
JamieR
05-18-2005, 11:54 PM
I think it *might* be possible to do it with cookies, but these can be disabled so a PHP session would be a better idea.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.