0

Really stumped on this one.

I'm trying to cache some resources with the HTML5 cache manifest (yes, I know, don't judge me), but the manifest seems to be caching itself.


The manifest file is actually a dynamic PHP script, so it has a .php extension.


The following headers are set (How do I completely disable caching in Cakephp?)

header('Cache-Control: no-store, private, no-cache, must-revalidate');                  // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0, max-stale = 0', false);    // HTTP/1.1
header('Pragma: public');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');                                       // Date in the past  
header('Expires: 0', false); 
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Pragma: no-cache');

header("Content-type: text/cache-manifest");

The manifest contains the following in the NETWORK section:

NETWORK:
/cachemanifest 
/cachemanifest/ 
/cachemanifest/* 
*/cachemanifest/* 
cachemanifest/ 
cachemanifest

/cachemanifest/manifest.php
cachemanifest/manifest.php

*

Of course, the manifest file itself is excluded from the CACHE: section.


There's also a .htaccess file in the same directory containing this:

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/cache-manifest "access plus 0 seconds"
</IfModule>

The site is built with CakePHP, which apparently has some 'helpful' caching mechanisms that I don't know much about. I'd assume the PHP headers would bypass anything... PHP could do.


So, what am I missing?

Community
  • 1
  • 1
Jeffrey Sweeney
  • 5,986
  • 5
  • 24
  • 32

2 Answers2

0

Actually, it looks like one of these worked. It just takes 30+ seconds for the cache to realize that it needs to update.

Jeffrey Sweeney
  • 5,986
  • 5
  • 24
  • 32
0

The way cache manifests work is that for the manifest to update itself some text inside the manifest has to change, even if it's just one letter. This can be done by having a build automator add a timestamp every time there is a change in code.

Coding Friend
  • 73
  • 1
  • 8