Speeding Up My Website

Bawebl kharrat.mohamed at gmail.com
Lun 21 Sep 22:08:34 UTC 2009


  Sent to you by Bawebl via Google Reader: Speeding Up My Website via
David Walsh :: PHP, CSS, MooTools, jQuery, and Everything Else by David
Walsh on 9/21/09

One of the biggest goals with my website redesign was to update
something no one sees — website speed. Sure I’m using different colors,
fonts, javascript techniques, and images but I’m most proud of the the
speed increases I made. Let me explain the ways I’ve improved my
website performance — maybe you can learn something from what I
implemented.
Image Optimization – PNG Crush
Unlike varying content pages, Images are a fixed download size so I
sought out to optimize image sizes. I used PNGCrush to compress images
without loss of image quality. Using PNGCrush I was able to knock off
120KB of useless image space.
Plugin Removal
I wasn’t happy about doing it but I removed the WP-Polls plugin.
Removing this plugin allowed me to avoid loading both jQuery and
MooTools on every page. Removing WP-Polls also allowed me to avoid a
few server requests (to CSS and JS files). I saved approximately 75KB
by doing this alone.
Javascript Compression and Consolidation
I’ve placed all of my javascript into one file. MooTools More classes
and custom plugins were all compressed and jammed into one file. This
allows for less requests to the server. About 40KB was saved using
compression.
Google AJAX API
Instead of bogging my virtual server down by serving up the same
MooTools Core javascript file, I’ve started letting Google carry that
burden using their AJAX Libraries API library. What’s great about using
their API is that if you’ve been to other websites that use Google’s
AJAX API, the file is already cached and my site loads faster.
.htaccess ETags and Compression
I took full advantage of Eric Wendelin’s guest post, Improve Your YSlow
Grade Using .htaccess, and used .htaccess to add Expires headers and
file compression strategies to decrease load time and implement file
caching.
PHP Caching
You’ll notice that my new design displays my RSS subscriber count,
Twitter follower count, and latest tweet. I’ve added caching strategies
to my website to make the RSS subscriber count and Twitter follower
count check once per day and my latest tweet check once per hour.
Implementing these caching strategies saves me remote requests on every
page load.
Database Query Caching
I’ve implemented WordPress’ DB Cache plugin which caches query results
and is proven more effective than WP-Cache and WP-SuperCache. I was
having a lot of problems with WP-Cache so this plugin was a godsend for
me — the site feel faster and I don’t run into problems with other
caching methods.
Room for Improvement
My website is not yet perfect — there are a few things I can improved:

- CSS Sprites — Since I’ve just launched the redesign, I didn’t want to
go into spriting yet in case I need to overhaul things. Sprites will
save me quite a few server requests.
- Media Temple Issues — Unfortunately I get a “Cannot Establish
Connection” every once in a while so I need to check out what’s causing
that. I never got those warnings on Dreamhost hosting.
- BuySellAds — I need to twists BSA’s arm into Gzipping their resources
to speed up downloading of those files. BSA implementing GZipping would
help out thousands of websites.
Have any other ideas for optimization? Let me know!

Don't forget to follow me on Twitter and be sure to visit Script &
Style for the best Javascript and CSS articles around! Blog traffic is
booming. Sponsor the David Walsh Blog and get your brand in front of
several thousand users per day!

Speeding Up My Website

Related posts:
- Reduce PNG Graphic Size Using PNGCRUSH
- PHP / MySQL Database Optimization Function
- Add the Script & Style Feed to Your Website
- Judging the Candidates Based Upon What Else? Their Website!
- Optimizing Your Website Structure For Print Using CSS

Things you can do from here:
- Subscribe to David Walsh :: PHP, CSS, MooTools, jQuery, and
Everything Else using Google Reader
- Get started using Google Reader to easily keep up with all your
favorite sites
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <https://lists.ubuntu.com/archives/ubuntu-tn/attachments/20090921/2d583107/attachment.html>


Plus d'informations sur la liste de diffusion Ubuntu-tn