fixed system header transmit to match google criteria
This commit is contained in:
parent
b6e32ac971
commit
749e079645
@ -52,6 +52,7 @@ class files {
|
||||
|
||||
$ext = pathinfo(self::$folders[$cat].$id);
|
||||
$ext = strtoupper(array_key_exists('extension', $ext) ? $ext['extension'] : '');
|
||||
header("Last-Modified: " . gmdate('D, d M Y H:i:s \G\M\T', filemtime(self::$folders[$cat].$id)));
|
||||
if(\SYSTEM\HEADER::available($ext)){
|
||||
call_user_func('\SYSTEM\HEADER::'.$ext);
|
||||
}else{
|
||||
|
||||
@ -56,7 +56,7 @@ class HEADER {
|
||||
*/
|
||||
public static function PNG(){
|
||||
if(self::checkHeader()){
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60))); // 1 hour
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 7))); // 1 week
|
||||
header('content-type:image/png;');}}
|
||||
/**
|
||||
* Send JPG Headers, if Header was not sent yet
|
||||
@ -65,7 +65,7 @@ class HEADER {
|
||||
*/
|
||||
public static function JPG(){
|
||||
if(self::checkHeader()){
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60))); // 1 hour
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 7))); // 1 week
|
||||
header('content-type:image/jpeg;');}}
|
||||
/**
|
||||
* Send JPEG Headers, if Header was not sent yet
|
||||
@ -74,7 +74,7 @@ class HEADER {
|
||||
*/
|
||||
public static function JPEG(){
|
||||
if(self::checkHeader()){
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60))); // 1 hour
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 7))); // 1 week
|
||||
header('content-type:image/jpeg;');}}
|
||||
/**
|
||||
* Send GIF Headers, if Header was not sent yet
|
||||
@ -83,7 +83,7 @@ class HEADER {
|
||||
*/
|
||||
public static function GIF(){
|
||||
if(self::checkHeader()){
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60))); // 1 hour
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 7))); // 1 week
|
||||
header('content-type:image/gif;');}}
|
||||
/**
|
||||
* Send JS Headers, if Header was not sent yet
|
||||
@ -100,6 +100,7 @@ class HEADER {
|
||||
*/
|
||||
public static function CSS(){
|
||||
if(self::checkHeader()){
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 7))); // 1 week
|
||||
header('content-type:text/css;');}}
|
||||
/**
|
||||
* Send LESS Headers, if Header was not sent yet
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user