PHP include pages cached by browser?

Started by rcjordan, September 06, 2013, 02:09:30 PM

Previous topic - Next topic

rcjordan

Looks to me like they are. If so, I'll move a large chunk of logic that called by many pages to an include to ease pounding the server unnecessarily after the 1st page is digested.

Drastic

Include alone shouldn't be cached, should be the whole page.

rcjordan


IrishWonder

Unless I misunderstood the question, aren't browsers caching the resulting HTML rather than php?

Rooftop

As IrishWonder says, it is only the resulting HTML that can be cached - as part of the wider page.  The browser isn't even able to tell which parts are from an include and which are not as it is all put together server-side.

rcjordan

Yeah, I was thinking along the lines of external js files and had what I thought was a caching event happen with the php include.  Turns out it was a problem with a particular variable.