Forums | Mahara Community

Open Discussion /
(Google) Page Speed


anonymous profile picture
Deleted user
Posts: 73

06 June 2009, 8:32 AM

Hi Nigel,

have you already checked Mahara with the new Firefox Addon (Google) "Page Speed" (http://code.google.com/intl/de-DE/speed/page-speed/download.html)?

It tells me something about "Leverage  Browser Caching" and "Compression (deflate)" ... and other interesting advises. Would it be useful to adapt the .htaccess file accordingly?

BR, Peer

anonymous profile picture
Deleted user
Posts: 73

06 June 2009, 12:59 PM

cont'd:

I googled a lot regarding this issue and found several code lines that  potentially might be worth to be added to the .htaccess code.

My .htaccess file looks like this now:

php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag magic_quotes_sybase off
php_flag magic_quotes_gpc off
php_flag log_errors on
php_flag allow_call_time_pass_reference off
php_value upload_max_filesize 50M
php_value post_max_size 50M

<Files config.php>
    Order deny,allow
    deny from all
</Files>

<Files .htaccess>
    Order deny,allow
    deny from all
</Files>

<Files lib.php>
    Order deny,allow
    deny from all
</Files>

# HTTP performance. This stuff tested in apache2 only.
# Enable mod_expires, mod_headers and mod_deflate!

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css application/x-javascript    

    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch "Windows 98" gzip-only-text/html
    BrowserMatch "MSIE [45]" gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

    SetEnvIfNoCase Request_URI \.(?:gif|jpeg|jpe|jpg|png|ico)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:avi|mpg|mpeg|mov|wav|wmv|mp3|wma|ogg)$ no-gzip dont-vary
</IfModule>

<IfModule mod_headers.c>
    Header unset ETag
</IfModule>
FileETag None

<IfModule mod_expires.c>
  <FilesMatch "\.(flv|ico|ppt|doc|pdf|avi|mpg|mpeg|mov|wav|wmv|mp3|wma|ogg|gif|jpeg|jpe|jpg|png|js|css)$">
    ExpiresDefault A4838400
  </FilesMatch>
</IfModule> 

anonymous profile picture
Deleted user
Posts: 1643

08 June 2009, 12:32 AM

Hi - yes, actually I was looking at it just the other day.

I am currently going on a big mission through Mahara's theming system, cutting out redundant CSS rules and cleaning up the HTML. I plan to use that plugin to help with some of the job. Mahara actually already includes a bunch of the rules you have in your .htaccess, we do some smart things already, but we're not doing quite so much css/js minification that we could do.

So in short - yes, I've heard of it, and I'll be taking its advice into account for Mahara 1.2 Smile

3 results