You must be logged in to make comments on this site - please log in, or if you are not registered click here to signup
Father Barry's Plugin Site: Speeding up e107 sites
Colour Scheme

Welcome

Username:

Password:


Remember me

[ ]
[ ]

Donate

If you find any of the plugins I write useful then please consider making a donation. These donations can be used to offset the cost of my web hosting allowing me to produce more plugins for the e107 community

Bug Tracker

Applications - 60
Open Bugs - 62
Pending Bugs - 3
Closed Bugs - 154
Go to Bugtracker

Plugin Versions

SPR Hosting

Unanswered Posts

The following forum posts remain unanswered
e_classfield 09 Mar 10 : 15:31
Dynamic Logo - [...] 04 Mar 10 : 14:42
Recipe menu pro[...] 03 Mar 10 : 08:39
Can't find Docu[...] 28 Feb 10 : 14:05
Recipe_menu pro[...] 27 Feb 10 : 16:39
Custom Events? 21 Feb 10 : 17:31
Articulate to n[...] 20 Feb 10 : 17:31
problem with gz[...] 17 Feb 10 : 23:31
Adding "An[...] 06 Feb 10 : 19:44
Feature recomme[...] 06 Feb 10 : 17:29

View all unanswered posts

Pages

Email to a friend Printable Version PDF Version

Speeding up Your Web Site



Following on from some experiments with Page Speed and YSlow plugins for Fire Fox I have modded my .htaccess file to include the following

RewriteEngine on
FileETag none
<FilesMatch "sleight_js.php$">SetOutputFilter DEFLATE
ExpiresActive on
ExpiresDefault "access plus 2 months"
</FilesMatch><FilesMatch "\\.(js|css)$">SetOutputFilter DEFLATE
</FilesMatch><FilesMatch "\.(gif|jpg|png|js|css|ico)$">ExpiresActive on
ExpiresDefault "access plus 2 months"
</FilesMatch>


Briefly what happens is slight_js.php now gets gzipped
all js and css files get gzipped before delivery
all gif,jpg,png,js,css and ico files get a long expiry date which means the browser caches them

When moving from page to page there are some considerable time savings.

Next job is to minify the javascript and css files in the theme and in plugins. Then we'll look at the order of delivering the js and moving as much as possible to the end of the page rather than the footer




Author : Father Barry
Created : 24 Dec 09 : 11:32 Last Updated : 24 Dec 09 : 11:26
Views : 985 Unique Views : 450

Comments

Hi Barry,
Copied this and pasted into my .htaccess file, but I got 500 internal server error and in the log was <FilesMatch> was not closed.

I played about with the code above and seems happier with the code below. I think the problem may have been an extra \ in the js|css line.
Cool stuff - it does make a difference, no doubt useful for bandwidth too!

Mike

RewriteEngine on
FileETag none
<FilesMatch "sleight_js.php$">
SetOutputFilter DEFLATE
ExpiresActive on ExpiresDefault "access plus 2 months"
</FilesMatch>
<FilesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
<FilesMatch "\.(gif|jpg|png|js|css|ico)$">
ExpiresActive on ExpiresDefault "access plus 2 months"
</FilesMatch>


Reply to this
[ Posted by 02 Jan 10 : 16:29 ]



Flag Counter

free counters

sefton east

Take a look at Sefton East Conservatives supporting Debi Jones
Render time: 0.1162 sec, 0.0254 of that for queries. DB queries: 42. Memory Usage: 4,494kB