Вот именно....(
И что же тут непонятного?
1 - включаем кэширование минут на 30 и более
2 - включаем gzip сжатие страниц
Первые два пункта выполняются в "общие настройки" - 1 на вкладке "система", 2 - на "сервер"
3 - В посиковик -> CSS optimiser и тут проводим сжатие CSS. Кстати лучше будет сразу воспользоваться FFox+Firebug+Page Speed. Так-как Page Speed после проверки предлагает сохранять сжатые версии файлов CSS, js и графику. Сохраняешь с правильными именами, затем заливай их на хостинг .
Ещё будет предложено сжать HTML, но тут немного сложнее.
открываем index.php шаблона, он имет вид:
<?php
/**
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/<?php echo $this->params->get('colorVariation'); ?>.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/<?php echo $this->params->get('backgroundVariation'); ?>_bg.css" type="text/css" />
<!--[if lte IE 6]>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ieonly.css" rel="stylesheet" type="text/css" />
<![endif]-->
<?php if($this->direction == 'rtl') : ?>
<link href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/template_rtl.css" rel="stylesheet" type="text/css" />
<?php endif; ?>
</head>
<body id="page_bg" class="color_<?php echo $this->params->get('colorVariation'); ?> bg_<?php echo $this->params->get('backgroundVariation'); ?> width_<?php echo $this->params->get('widthStyle'); ?>">
<a name="up" id="up"></a>
<div class="center" align="center">
<div id="wrapper">
<div id="wrapper_r">
<div id="header">
<div id="header_l">
<div id="header_r">
<div id="logo"></div>
<jdoc:include type="modules" name="top" />
</div>
</div>
</div>
ну и так далее. Удаляем из него комментарии и лишние пробелы. Заодно можно сделать рокировку для <jdoc:include type="head" /> и CSS и получится примерно такой вид:
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/<?php echo $this->params->get('colorVariation'); ?>.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/<?php echo $this->params->get('backgroundVariation'); ?>_bg.css" type="text/css" />
<!--[if lte IE 6]>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ieonly.css" rel="stylesheet" type="text/css" />
<![endif]-->
<?php if($this->direction == 'rtl') : ?>
<link href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/template_rtl.css" rel="stylesheet" type="text/css" />
<?php endif; ?>
<jdoc:include type="head" />
</head>
<body id="page_bg" class="color_<?php echo $this->params->get('colorVariation'); ?> bg_<?php echo $this->params->get('backgroundVariation'); ?> width_<?php echo $this->params->get('widthStyle'); ?>">
<a name="up" id="up"></a>
<div class="center" align="center">
<div id="wrapper">
<div id="wrapper_r">
<div id="header">
<div id="header_l">
<div id="header_r">
<div id="logo"></div>
<jdoc:include type="modules" name="top" />
</div>
</div>
</div>
И так до конца. - экономия пару кило.
4 - включаем сжатие остальных файлов. Для этого обычно достаточно включить акселератор на хостинге. На уважающем себя хостинге такая фишка есть.
5 - осталось сделать несколько записей в
.htaccess . Я не буду переписывать весе тексту тут написанные, просто покажу что я дописал в стандартный. Заодно может получу указания на ошибки. Хотя параметр Page Speed - 86/100 мне нравится.
# mod_rewrite in use
RewriteEngine On
# Дописал
RewriteCond %{HTTP_HOST} ^www.ИМЯСАЙТА.ru$ [NC]
RewriteRule ^(.*)$ http://ИМЯСАЙТА.ru/$1 [R=301,L]
# В конце файла
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 7 days"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
</IfModule>
#Это я добавил в период последней правки файла, что привело к 87/100
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<FilesMatch "\.(js|css)$">
Header set Cache-Control "max-age=604800, public, must-revalidate"
</FilesMatch>
Ну, а если много текста, что делать?
Читать то надо!Чуть не забыл. Ещё я поставил компонент для кэша запросов БД.
И прошу, не рассматривайте данный текст как "ИСТИНУ В ПОСЛЕДНЕЙ ИНСТАНЦИИ". Метод - "чтение советов Знающих"(что я и сделал) + "Научного Тыка" всегда были и остаются лучшим способом добиться успеха.