+ header('Content-Length: ' . $file_size);
+ header('Cache-Control: public, max-age=604800');
+ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $cache_age) . ' GMT');
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $file_modified_time) . ' GMT');
+
+ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
+ $request_modification = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']);
+ if ($request_modification >= $file_modified_time) {
+ http_response_code(304);
+ return;
+ }
+ }