CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Force Session Timeout

Print topic Send  topic

Author Message
bon733

Posts: 25
Posted: 09/01/2005, 12:47 PM

How does one force a user after they have timed out and sent to the login page, not to be able to use the back button to see the previous page? I would really like to show them a page stating that they have timeout and should login again if they press the back button.
View profile  Send private message
peterr


Posts: 5971
Posted: 09/01/2005, 1:04 PM

You would need to disable or expire the cache of all pages that you don't want to be cached. Otherwise IE will always display the cached version.
There are probably many ways to disable or expire the cache, either via META tags in the HTML, or via ASP code.

Just keep in mind that the page performance will be slower and the server load will be heavier if each page needs to be executed every time, even when pressing the Back button. I find it sometimes frustrating waiting for pages to reload on various Websites when I just viewed it a few seconds ago.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
DonB
Posted: 09/01/2005, 7:52 PM

This may not work 100% since it's up to the browser to obey or ignore this
cirective. You'd put this in the <HEAD> section of your html file(s):

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

IIS lets you set these for the whole site using the IIA admin tool. This
might produce unacceptably-poor performance overall, though.

You can add some or all of these to the HTTP Headers and see how well it
works.

header("ETag: PUB" . time());
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5) . " GMT");
header("Pragma: no-cache"); # this is equivalent to the <META> tag shown
above
header("Cache-Control: max-age=1, s-maxage=1, no-cache, must-revalidate");

(note this is for PHP, and uses the PHP syntax, but you can pick out the
header names and their values - names preceed the ":" and the value follows
it).

Enter items one at a time in the "HTTP Headers" panel for your website
properties in the IIS administrator tool. It gives you two fields to fill
in, one for name and one for value.

--
DonB

http://www.gotodon.com/ccbth


"bon733" <bon733@forum.codecharge> wrote in message
news:643175ad7d7676@news.codecharge.com...
> How does one force a user after they have timed out and sent to the login
page,
> not to be able to use the back button to see the previous page? I would
really
> like to show them a page stating that they have timeout and should login
again
> if they press the back button.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.