[thelist] Website speed smart practices (was gzip and far future expires header )

Bob Meetin bobm at dottedi.biz
Thu Jan 15 22:58:28 CST 2009

Post should have been: Website speed smart practices

Background: I use both websiteoptimization.com and YSlow to review 
websites. I could use some clarification on purpose and approach to a 
couple optimization techniques:

Q1)  Is there a difference in effect/purpose on setting header expires 
in a PHP file vs. in the .htaccess?

PHP method :

header('Content-Type: text/javascript; charset: UTF-8');
header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60*10) . ' GMT');

.htaccess method:

<FilesMatch "(joomla.javascript.php)">
  Header set Expires "Fri, 31 Dec 2010 20:00:00 GMT"

Q2) gzip vs minify or removing white space - Example - you have a 
javascript or php file with comments and perhaps white space.
If you use gzip as in the above PHP script, is there any further 
'significant' savings by stripping the file of white space.  If so is 
there a utility that can be downloaded to do this rather than doing it 

I read something about minify where you do something like coming css or 
js files in a list like:

<link rel="stylesheet" href="main.css, layout.css" type="text/css" /> or 
<link rel="stylesheet" href="main.php, layout.php" type="text/css" />

Any significant effect?

Q3) With many CMS systems such as Joomla, the way the template system is 
built (off the shelf), you end up with a lot of HTTP requests as a 
result of many modules accompanied by both stylesheets and javascript 
files. Add in a few images and you could easily have 40 HTTP requests. 
What is a good way to handle this if it cannot be avoided?

Q4) Yslow report that images, js and css files have Etags?  If it should 
be done, how do you configure or disable them?

Example website: www.dottedi.biz - I just upgraded the version of Joomla 
and am reworking the design. I feel that it should load much faster than 
it is. Home is just under 4 seconds for me and I have still have some 
stuff to add.


More information about the thelist mailing list