This may be a bit of an obvious question, but I still thought it was worth asking. I am building a fairly complicated site with a lot of includes.
In terms of content that needs to be on every page, is it actually faster to use include files (I know it is better for maintenance). I am wondering if anyone knows (for sure) if browsers cache include files. So for example page looks like this:
PAGE 1:
<include "includes/phpFunctionsNeededOnAllPages.php">
<include "header.htm">
<include "includes/menu.htm">
<p>individual body content for page 1</p>
<include "includes/footer.htm">
PAGE 2:
<include "includes/phpFunctionsNeededOnAllPages.php">
<include "header.htm">
<include "includes/menu.htm">
<p>individual body content for page 2</p>
<include "includes/footer.htm">
Does the browser cache the data in all of the include files? So when the next page is loaded, it doesn't have to check or reload the phpFunctions/header/menu/footer and just loads that pages body content? Does it cache the include files these the same way it would cache any other set of html pages?


Reply With Quote

Bookmarks