- header('Expires: ' . $now); // rfc2616 - Section 14.21
- header('Last-Modified: ' . $now);
- header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
- header('Pragma: no-cache'); // HTTP/1.0
-
- // whether to show html header?
- if ($action != 'download') {
+ $this->addHeader('Expired', $now); // rfc2616 - Section 14.21
+ $this->addHeader('Last-Modified', $now);
+ $this->addHeader('Cache-Control:', 'no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
+ $this->addHeader('Pragma:', 'no-cache'); // HTTP/1.0