Reply to Re: reload php page on browser back button

Your name:

Reply:


Posted by NC on 12/20/05 04:47

4psite wrote:
>
> I am creating (using php) an html page with many links.
> Clicking on a link open the link as _self.
> Clicking on the browser back button brings the prv html page (with the
> links,) but instead of getting it from the cache it will recreate it.
> My questiosn, how to avoid the re-creation of the php/html page and
> just to reload it from the cache.

Send an "Expires:" header, perhaps? Something like this:

header('Expires: ' . date('r', time() + 3600));

This will tell the browser that the content it just received is going
to be valid for another hour (3,600 seconds), so it shouldn't bother
getting an updated version from the server. If you want a longer
period, just increase the number...

This said, note that almost any HTTP header is a suggestion, not an
order. There is nothing you can do to force a client to obey the
header, if it chooses not to...

Cheers,
NC

[Back to original 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

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