You are here: Re: Back Button « PHP Programming Language « IT news, forums, messages
Re: Back Button

Posted by Erwin Moller on 11/17/06 09:36

Mike Scholl wrote:

> I have written my first bit of php/sql code and set up a website with a
> small database.
>
> I use a html form and submit button to add/edit etc data.
>
> If you are editing data, after you have updated the database, if the user
> presses the back button repeatedly they scroll back through the previous
> screens which show the data BEFORE the update.
>
> I note on some site you get a "this page has expired" message if you try
> to scroll back.
>
> How can I do that? Or in some other way prevent outdated data from being
> displayed.
>
> Mike

Hi Mike,

That is a browserthing. Good browsers respect some headers that come with a
document that say when a document expires. Caching influences this
behaviour too.

Here is a article:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

Read at least from point 14.9 (cache control) and 14.21 (expiration).

And above all: TEST on a few browsers you want to support.
If you stick to the RFC, you did what you could to get the desired
behaviour, but be aware that the browser you use can be buggy (like some
versions of IE) and you need to circumvent that by adding more headers.

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация