Welcome to WebmasterWorld Guest from 54.196.144.242

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Cache a php include page?

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

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

New User

5+ Year Member

joined:Apr 23, 2010
posts:21
votes: 0


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.
10:36 pm on Aug 15, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12541
votes: 1


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.