When I see my website loading very slow, I get irritated as I want that to load fast on any type of Internet connection. Because, I’m trying to reach out to all…

Step by Step take action on website optimization and speed up your website. All it takes is the hacking mentality which lets you digg out lots of things from the world of Internet.

One simple way to improve the performance of your website is to set up HTTP Expires headers for static content well into the future. For example,Images, CSS files, PDF’s. This forces your clients browser to cache them and make your website load fast.

If your website is running on Apache web server, put the following lines of code into .htaccess or Apache configuration file and you’re done with it. It works if you have mod_expires module enabled in your web server.

ExpiresActive On

<FilesMatch “\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
Header set Expires “Thu, 15 Apr 2010 20:00:00 GMT”
</FilesMatch>

Here is an another interesting website which I found on the net while studying about mod_expires.

Tags: , , , , ,

4 Responses to “Speed up website: Set HTTP Expires header”

  1. Aravinda says:

    Interesting… :)

    When i used YSlow plugin in Firefox, it was giving suggestion like “expires header is not set for static contents”. But i was confused that how i can add header to images, Css etc…

    Now i got the answer :)

  2. TechFiz says:

    Aravinda,

    I wanted to write about Firebug and YSlow before writing about this ;) .

    Yeah there are lot many tweaks which we can add to optimize the website performance. My page is loading faster now.

  3. Thats what I was looking for.

    Even My newly installed blog loads slow and yslow advised me to use mod_expire and mod_header.

    Can you please tell me the difference and also advise what will be better to use?

  4. TechFiz says:

    Sure Abhishek.. Will try to write about it soon..

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">