CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 How to expire session in PHP

Print topic Send  topic

Author Message
pruiz

Posts: 29
Posted: 03/29/2005, 4:12 AM

:-/

PHP 4.3.10
MYSQL 4.1.10a
2003 Server
I would like to prevent a user from clicking on the forward button and accessing my website without having to log back in. Is there a piece of custom code to do this or is there a setting that I am missed?

PR
pruiz
View profile  Send private message
Nicole

Posts: 586
Posted: 03/29/2005, 5:13 AM

As I understand the problem is that not logged in users can access Restricted page using Back/Forward browser buttons.
You cannot disable browser buttons, however you can try to prevent page caching which is helpful in your case. Use special html meta tags:
<META HTTP-EQUIV="expires" CONTENT="0">
<HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
You can also improve it with php code, e.g. with the help of header() function. Details could be found in PHP manual.
http://www.php.net/manual/en/function.header.php
Try to search on at www.w3c.org and through Google to find out what other methods of cache control exist.
The other trick when redirecting to any page, always redirect to it with some random parameter(like timestamp)
e.g. search.php?name=doors&random=4575845748

_________________
Regards,
Nicole
View profile  Send private message
peterr


Posts: 5971
Posted: 03/29/2005, 1:52 PM

I think tha this can be "fixed" by changing the "Improved HTTP Caching" property to "No" in your project. Only your Website may becomes slower since each page will be executed every time, without using cache.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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