Performace adds:
- jpeg MIME content. - changing echo instead print for js and css files.
This commit is contained in:
@@ -341,7 +341,7 @@ class Bootstrap
|
|||||||
if (strtolower( $typefile ) == 'js' && $typearray[0] == 'translation') {
|
if (strtolower( $typefile ) == 'js' && $typearray[0] == 'translation') {
|
||||||
Bootstrap::sendHeaders( $filename, 'text/javascript', $download, $downloadFileName );
|
Bootstrap::sendHeaders( $filename, 'text/javascript', $download, $downloadFileName );
|
||||||
$output = Bootstrap::streamJSTranslationFile( $filename, $typearray[1] );
|
$output = Bootstrap::streamJSTranslationFile( $filename, $typearray[1] );
|
||||||
print $output;
|
echo $output;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ class Bootstrap
|
|||||||
if (strtolower( $typefile ) == 'css' && $folderarray[count( $folderarray ) - 2] == 'css') {
|
if (strtolower( $typefile ) == 'css' && $folderarray[count( $folderarray ) - 2] == 'css') {
|
||||||
Bootstrap::sendHeaders( $filename, 'text/css', $download, $downloadFileName );
|
Bootstrap::sendHeaders( $filename, 'text/css', $download, $downloadFileName );
|
||||||
$output = Bootstrap::streamCSSBigFile( $typearray[0] );
|
$output = Bootstrap::streamCSSBigFile( $typearray[0] );
|
||||||
print $output;
|
echo $output;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,10 @@ if (file_exists($requestFile)) {
|
|||||||
if($pos < $size) {
|
if($pos < $size) {
|
||||||
//if this file got an extension then assign the content
|
//if this file got an extension then assign the content
|
||||||
$ext_file = substr($request, $pos, $size);
|
$ext_file = substr($request, $pos, $size);
|
||||||
if ($ext_file == "gif" || $ext_file == "png" || $ext_file == "jpg") {
|
if ($ext_file == "gif" || $ext_file == "png") {
|
||||||
$ext_file = 'image/'.$ext_file ;
|
$ext_file = 'image/'.$ext_file ;
|
||||||
|
} elseif ($ext_file == "jpg" || $ext_file == "jpeg") {
|
||||||
|
$ext_file = 'image/jpeg';
|
||||||
} elseif ($ext_file == "swf") {
|
} elseif ($ext_file == "swf") {
|
||||||
$ext_file = "application/x-shockwave-flash";
|
$ext_file = "application/x-shockwave-flash";
|
||||||
} elseif ($ext_file == "json" || $ext_file == "htc" ) {
|
} elseif ($ext_file == "json" || $ext_file == "htc" ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user