Performance ->htaccess

Discussion regarding Joomla! Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Nov 10, 2009 2:15 pm
Location: Russia

Performance ->htaccess

Post by doctorgrif » Tue Nov 10, 2009 2:38 pm

My version of the approach to the optimization and immediately apologize for bad English
Raw materials:
1. Sites (i'm took his -
2. FTP client (filezilla - my choice)
3. FF + YSlow
4. TEXT editor
5. The hands and head in a set

1. FF supply YSlow (Installation of extensions transparent, have done) and check the performance score for sites without optimization
initially I had all saytv were in the C band (well, average - for the ignorant)
2. FTP client crawls into your FTP and start raping htaccess (add at the end - it's easier then navigate)
a) The mechanism ETag (Entity Tag) is designed to detect new versions of the requested files. When the server sends the client a file, it adds a header ETag, in which writes the hash file form. Here, we ask, why do we need it? We often change the My Content?

Code: Select all

Header unset Pragma 
FileETag None 
b) Graphics (part of the template image in the content), js, CSS, site icon, included video and so on. Very rarely updated - in the cache of
and longer

Code: Select all

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> 
Header set Cache-Control "max-age = 290304000, public" 
Header unset Last-Modified 
</ FilesMatch> 
* Using Cache-Control header can specify how long the proxy server can store files in the cache.
** Remove Last-Modified header with the ETag header will completely avoid the use of queries test new versions of files If-Modified-Since and If-None-Match. Thus the files will be cached only on the basis of the available values of the Cache-Control and Expires.
*** Emphatically do not recommend deleting Last-Modified and ETag for. Html files.
3. minimization CSS and js
recommend 2 Resources (for css, works on csstidy 1.3) and (for js) rejoice
4. CSS files make up head
means the index.php template move all css calls immediately after <head>
5. all js as low as possible (before the </ body>) - I'm talking about counters, analytics, metrics
PS: ksta - for those who wish can make and js-party extensions (comments, voting and so on.) Wrapped their terms
6. make calls in the template CSS from the modules, just putting them in the head, but the wrapping condition:

Code: Select all

<? php if ($ option == 'which should display') (?> <link href = "<? php echo $ mosConfig_live_site;?>/modules/modulename/filestyle.css" rel = "stylesheet" type = "text / css" /> <? php)?> 
in modules - comment on (these things // set before the line call)
7. owners apache2 deploy the compression (read - stuck in htaccess lines)

Code: Select all

<FilesMatch "\.(js|css)$"> 
SetOutputFilter DEFLATE 
</ FilesMatch> 
owners of version 1.* modestly chewed nervously smoking in aside (to which I am)
8. optimized graphics
advise for windows (there are references to the *nix/mac options like ...)
Outcome: - Grade A Overall performance score 91 - Grade A Overall performance score 91
And this is without gzip compression, CDN
Here, use
Special thanks to for "there is something to read," Cyril and Methodius for any letters to my parents for the phenotype and genotype, the wife - for beer :)
9. Browsers (by IE7 like the rest of the self-a) can "eat" style files and archived scripts and apache, including 1.* active in that panders to them, having in the default configuration of the corresponding module, which is 99,98 % cases activated for hosting
our actions:
templates_css.css-> templates_css.css.gz (gz - important)
*.js-> *.js.gz
Do not forget to change the names of files in scripts /* tested on your face gives scripts in *.gz
accordingly modify slightly p.6

Code: Select all

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|gz)$"> /* For perverts and can finish like this - | gz me | css.gz | js.gz 
Header set Cache-Control "max-age = 290304000, public" 
Header unset Last-Modified 
</ FilesMatch>

User avatar
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Wed Jun 25, 2008 3:38 pm
Location: Plano, Texas, USA

Re: Performance ->htaccess

Post by prdg1 » Sat Feb 27, 2010 12:23 am

You are fabulous! You don't know how much this has helped my client. I will use ALL your tips with future clients.
Patsy Gillispie
Designer/Developer - Dallas, Texas
Visit my site:


Return to “Performance - 1.0.x”