[eluser]bwuk[/eluser]
Hi,
so I've been doing more digging on this issue.
If I change my .htaccess FilesMatch directive to:
Code:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|php)$"> # (note the php at the end)
Header set Cache-Control "max-age=290304000, public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</FilesMatch>
then my javascript files are then cached....however, this leads to all of my other php files being cached....not what I want
Ideally, I'd prefer to do this in CI. I've extended Controller, and added my own called Public_Controller. In there, I do some detection to determine whether or not I'm able to cache certain content. If I'm using my javascript class or my css class, then I can cache the content:
Code:
if ($this->cacheable_content())
{
$this->output->cache(1440);
}
I've also tried:
Code:
if ($this->cacheable_content())
{
$this->output->set_header("Cache-Control: max-age=290304000, public");
$this->output->set_header("Expires: Thu, 15 Apr 2010 20:00:00 GMT");
}
but again, that just doesn't seem to work. I'm running out of ideas here
Thanks
bwuk