RE: Re: handling a user pressing browser's back button

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Perhaps it might help to think about this from the point of view of what
you are trying to prevent. Is the most important thing to make sure that
your data integrity is intact?

For example, 

- you allow users to add a record on page 1
- on page 2, check that the record does not already exist, if it doesn't
then insert it

- you allow users to update or delete a record on page 1
- the only problem here is if they are trying to update a record they
have already deleted, then pressed back to see it again. Once again, you
just need to check for its existence on page before running the update
query.

This way, you don't need to worry about what the browser does when the
user hits back, or which page it serves

Mark
-----Original Message-----
From: Richard Lynch [mailto:ceo@xxxxxxxxx] 
Sent: 27 April 2005 06:03
To: Matthew Weier O'Phinney
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Re: handling a user pressing browser's back button


On Tue, April 26, 2005 7:02 pm, Matthew Weier O'Phinney said:
> 1. Display form on page 1. Page 1 has Cache-Control: no-cache header. 
> 2. User submits form to page 2 3. Page 2 processes form, stores 
> required variables in session, and then
>    redirects to page 3.
> 4. Page 3 displays results (success page, search results, etc.)
>
> At this point, when you hit the back button, you *should* get to page 
> 1... which, because of the no-cache header, is forced to reload.

Except that if you're fast enough, and can hit the ALT-left_arrow, and
then escape fast enough to get to page 2.

Or, with some browsers, you can't get "back" to page 1 AT ALL, unless
you hit "back" twice rapidly in succession, or use the popup back menu
to "skip" the middle page that does the re-direct.

I *hate* sites that do this to me!

I've even been known to just stop using a site if it annoys me often
enough in this regard.

YMMV

NATAU (Not applicable to all users)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 2000' REGISTERED COMPANY

**********************************************************************

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from http://www.gammaglobal.com

E&OE

**********************************************************************
**********************************************************************


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux