Cacheability of a PGP file...

Posted By: scannist ()
Posted On: 2005-Jan-24 09:30

Hello

I have an SSI (service side include) for the menu. Most of my files are .htm and a couple others are .php as they serve up some RSS feeds.

I noticed my site's pages weren't "cacheable" - no "modified last" date was being provided by the server. After reading up on the subject, I found I needed to change the file attributes to 654 and use "XbitHack Full" in the .htacess file.

Now the .htm files are cacheable, but the .php files still aren't. Do I need more commands in the .htaccess file?



Posted By: scannist ()
Posted On: 2005-Jan-24 21:40

Okay... Forget my last post. I decided to dump SSI.

Now that I have, all of my pages are "cacheable" with one big exception and that's my few PHP files.

How do you get PHP files to be cacheable / provide "last modified" data?


Posted By: lizardz ()
Posted On: 2005-Jan-24 23:26

look up 'php header last modified' on a search engine.

you need to make a little function that creates a last modified header based on the actual file last modified date, assuming most of the content is static. If the content is dynamic, it's a pain, you have to do more complicated things, I wouldn't bother.


Posted By: scannist ()
Posted On: 2005-Jan-24 23:43

I presume to say the content of the PHP files is dynamic since it's updated daily from RSS feeds.