Forum Moderators: open

Message Too Old, No Replies

HTML Print Preview Cache

         

Pico_Train

2:48 pm on Aug 16, 2007 (gmt 0)

10+ Year Member



Hi There,

We are generating static HTML files from a PHP Script.

We are having cache issues with proxies displaying the same content everytime unless you do the old ctrl+f5 to refresh the static page.

We've tried the meta headers with pragma and cache-control to no avail.

Is there perhaps another way to get around these cachin issues?

We aren't sure that installing Mod_Deflate and Mod_Headers and Mod_Expires in conjunction with .htaccess will solve the problem.

Any help would be greatly appreciated!

Thanks!

A \X/eb/X\aster

JAB Creations

10:22 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well you could try having PHP set the page to not be cached, I do this with a dynamic JavaScript file though it still has the PHP extension at the end of the file name. Not sure if this will work if you're generating a separate file though...

header('Content-type: application/javascript');
header('Expires: Tue, 22 May 1988 03:20:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, n0-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

- John