Forum Moderators: coopster

Message Too Old, No Replies

Cache a php include page?

Is there a way to get the browser to cache the page?

         

hiccupsheadache

5:14 pm on Aug 9, 2012 (gmt 0)

10+ Year Member



Hi guys,

I have an almost static website - that is put together using php include statements.

I've been told by my host that the php code i'm using is causing memory problems (although i didnt even think "include" would use that much memory)

If my page looked like this:


<body>
<?php
include('header.php');
include('contents1.php');
include('footer.php');
?>
</body>


And the included files just contained html code, what is the best way to cache the complete page to stop the php code running each time?

Thanks for the help!

Cheers.

coopster

10:36 pm on Aug 15, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



There are lots of caching mechanisms and techniques (good read: [mnot.net...] )but I highly doubt this is an issue for you unless you have a programming logic loop running errant somewhere in the mix.