We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I display image, now:
$filename = 'avatar.png'; $etag = md5_file($filename); $this->response->setHeader('etag', $etag); $this->response->setHeader('Cache-Control', 'must-revalidate'); $retag = $this->request->getHeader('HTTP_IF_NONE_MATCH'); if ($retag AND $retag == $etag) { $this->response->setStatusCode(304, 'Not Modified'); $this->response->send(); } else { $this->response->setHeader('cache-control', 'max-age=3600'); $this->response->send(); http_send_content_type("image/jpeg"); http_send_file($filename); }
if has send_file:
$filename = 'avatar.png'; $etag = md5_file($filename); $this->response->setHeader('Etag', $etag); $this->response->setHeader('Cache-Control', 'must-revalidate'); $retag = $this->request->getHeader('if-none-match'); if ($retag AND $retag == $etag) { $this->response->setStatusCode(304, 'Not Modified'); $this->response->send(); } else { $this->response->setHeader('Cache-Control', 'max-age=3600'); $this->response->send_file($filename); $this->response->send(); }
The text was updated successfully, but these errors were encountered:
This is already implemented but needs to be documented
Sorry, something went wrong.
No branches or pull requests
I display image, now:
if has send_file:
The text was updated successfully, but these errors were encountered: