Jump to content

back button on browser?


rsammy

Recommended Posts

I don't think so. Your best bet is opening the page in a window (using javascript) with the toolbars etc removed.

 

Or if you can somehow remove the users history, but I'm not sure if you can do that and many people would not be happy if you did anyway.

Someone please correct me if I'm wrong..

 

 

If you're not wanting people to go back to a certain page from a certain page I'm sure you can have an if statement checking what page you were sent to the page from. If it's one you don't want it to be accessed from, then it sends an error message.

Link to comment
Share on other sites

just force the previous page to "expire" thats the only way from stopping people from viewing what was sent, but some browsers (like opera) keep everything in cache, so really, there is no way of stopping people from going to the previous page

Link to comment
Share on other sites

just force the previous page to "expire" thats the only way from stopping people from viewing what was sent, but some browsers (like opera) keep everything in cache, so really, there is no way of stopping people from going to the previous page

 

how do i do this?

Link to comment
Share on other sites

just out of curiosity.. why would you want to stop the user being able to go back?

 

ok. i have to implement the logout stuff. when logout is clicked on screen, i send it to logout.php where i am doing this...

<?PHP
//require_once ("phpInclude/config.php");
require_once ("../config.php");

header("Expires: Mon, 26 Jul 2001 05:00:00 GMT");    // Date in the past

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");



?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>INSTICOMM</title>
<link rel='stylesheet' type='text/css' href='css/styleSheet.css'>

<Script language=javascript>
</Script>



</head>

<BODY onload="window.scroll(0,yoffset)">

<table width="900" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="4" bgcolor="#FFFFFF">
      <div align="left"><font color="#FFFFFF"></font></div>
      <div align="right"><font color="#FFFFFF"><img src="images/title_barom.jpg" width="900" height="69"></font></div></td>
  </tr>
  <tr>
    <td align="left" valign="top" width="300"> <table width="300" border="0" cellspacing="0" cellpadding="0">

        <tr>
          <td align="left" valign="top"> <SCRIPT language="JavaScript">

   tree.loadState()

   tree.display()

</SCRIPT> </td>
        </tr>
      </table>

      <p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">***********************<br>
                         XYZ Software<br>
   Version <? print("$version"); ?><br>
        ***********************

<?
  	if ($demo_disclaimer_option =='ON')
  	{
	print("<br>");
      	print("<b>$demo_disclaimer1</b>");
      	print("<br>");
      	print("$demo_disclaimer2");

    }
?>  </p>

<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><? print("<b>$copyright1</b>"); ?></p>

</td>
    <td colspan="3" align="left" valign="top"> <br> <br> <table width="450" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#006699">


                  For security reasons, please close your browser immediately.

</table>

</body>

</html>

 

still, when Back button is clicked on browser, it goes back. Its another thing that it wont let be do anything when I click some link or button on the previous page(after clicking Back button). It will take me to the login screen. but, still, as long as i keep clicking back button, it takes me through all thepages showing all of the info on screen!!

 

is there a way to block that?

 

thanx

Link to comment
Share on other sites

yeah. set up a function which checks if you're logged in or not.

I'm not sure how you've set up your log-in system, but on mine I've got a global variable called $logged_in which will either be true or false.

If true, then you are logged in. If false then you are not. I have a function like this:

function isLogin(){
   global $logged_in;
   if(!$logged_in){
      header("location:/index.php");
  exit;
   }
}

which I run at the top of every page I want only viewable to logged in users.

If the user isn't logged in it sends them to my index.php file.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.