You are here: how to mark php document as cachable (expires only when php file changes) « PHP Programming Language « IT news, forums, messages
how to mark php document as cachable (expires only when php file changes)

Posted by News KF on 10/24/46 11:24

Hi,


I'm new to cahce control, so I hope my question makes sense.


let's assume a small php file
like
<html><body>
<?php
$max=10;
for($i=0;$i<$max;$i++){
print("$i<br>\n");
}
?>
</body></html>


Obviously the output of this file is predictably constant as it would be
for any html file.

I assume, that apache would allow a foreign browser to detect, that
a html file (creation date or expire) does not have to be reloaded
except it has been updated on the server.


On the other hand I assume, that php will set the expire attributes for
php files per default such, that the request will not be cachable, as
php is normally being used for dynamic web pages.

However my above php file will always create the same output independent
of when and how it will be called.


So what exact header would I have to pass to indicate to make the
browser understand, that the php file does not have to be refetched,
except the php file (its creation date) changed.



Thanks in advance for any support.


If my request is not clear, then I'll reexplain differently.

 

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

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