1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[METHOD] How To Optimize Your Page Speed ?

Discussion in 'White Hat SEO' started by HostStage, Feb 10, 2012.

  1. HostStage

    HostStage Jr. VIP Jr. VIP Premium Member UnGagged Attendee

    Joined:
    May 20, 2010
    Messages:
    1,774
    Likes Received:
    1,731
    Occupation:
    BHW - CEO of Webhosting Company
    Location:
    BWH from France
    Home Page:
    Hey Guys,

    Today, i'm going to cover a critical aspect of on page SEO. Hang On it will be long and not necessary exhaustive.

    Page Speed is very important for 2 reasons :

    - It helps Google to crawl further your website which is good for indexing of course
    - It reduces your bounce rate or worse your pogosticking as your website is loading very slowly.

    NB : Pogosticking = when a user goes to your website, goes back, picks another website and stay at your competitor. G. Panda take it as a factor of quality and you can now get outranked because of it.


    Here are the tips :


    1) The first thing to do is to used a golden tool which is the google page speed plugin :

    For firefox users you have to use a plugin named firebug which is just great !

    Once you have set it up properly, run a page speed test on your website. And try to match the orange, and red spot titles with this how to.


    2) Enable Gzip if your web hosting provider allows it. Add this line at the top of your websites :


    PHP:
    <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

    Then you can check if it is enabled here :


    3) Compress your images. This is easy a bit boring but it increases drastically your loading time.

    For that you can use either photoshop, The Gimp (free) or what i use personnally as i find it convenient the Google Page Speed plugin itself.
    As it is showing you which images are optimized and which are not and allow to compress them with the save as button.

    4) Open / Create a .htaccess file and place this code :

    This will litteraly do some magic. If you have problem with the Gzip code stated above you can paste the full content. If you don't have problem with it you can remove this :

    5) Place your javascript ressources at the bottom of your page. Personnally i don't do it, as i like to have my header with everything in it. But it will definitly help

    6) Another thing i don't do because i go quite often in the code of my website, but you can remove the blank space of every file of your website, it will reduce the size of your pages by 10-25% according the lenght. You could do it for CSS code too.

    7) Optimize your SQL databases the more often you can according to your traffic, through PHPmyadmin or through your CMS. This will bring you a light improvement and prevent you for unexpected crash.

    Wordpress Users :

    1) If you use wordpress you have to use a caching plugin like supercache or hypercache, it will drastically help with your loading time. You can earn something like 800% of your loading time with such a plugin according to some benchmarks :

    Here is the place to find Super Cache :


    To Go Further :

    To be honest i don't do these as it is time killing when you have a website already and it makes you earn between 2 and 5 points in G speed :

    1) Use CSS Sprites : The concept is to merge all your website's structural images into 1 mockup, then use the CSS to place the others elements into your mockup.
    2) Use External Subdomain to load your external ressources (Javascript for exemple). It will allow you to use the speed of 2 servers instead of 1 to load your content


    I believe there are others criterias i may have omitted but this is a good basis to drastically increase your loading time. It is an open thread, so go ahead with your own methods.
     
    • Thanks Thanks x 45
  2. IamNRE

    IamNRE Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 18, 2010
    Messages:
    4,663
    Likes Received:
    7,108
    Occupation:
    Generate Leads With FB Ads For Just $1
    Home Page:
    WoW!

    Sweet Post, very detailed ... I learned a few tricks!

    Thanks + rep given.
     
    • Thanks Thanks x 1
  3. HostStage

    HostStage Jr. VIP Jr. VIP Premium Member UnGagged Attendee

    Joined:
    May 20, 2010
    Messages:
    1,774
    Likes Received:
    1,731
    Occupation:
    BHW - CEO of Webhosting Company
    Location:
    BWH from France
    Home Page:
    Thanks buddy, talk to you soon :)
     
  4. Latnemele7

    Latnemele7 Registered Member

    Joined:
    Dec 28, 2011
    Messages:
    51
    Likes Received:
    5
    Thank you I learned a lot :)
     
  5. misteryou.

    misteryou. Power Member

    Joined:
    Feb 1, 2012
    Messages:
    573
    Likes Received:
    109
    is wp super cache the same as w3 total cache or a complement ?
     
  6. reinie

    reinie Elite Member

    Joined:
    Jan 16, 2009
    Messages:
    1,574
    Likes Received:
    1,040
    One of sites takes 7.9 seconds to load and I can not bring it down no matter what i tried, I will def try some of these tips, thanks
     
  7. brseo

    brseo Registered Member

    Joined:
    Nov 4, 2011
    Messages:
    84
    Likes Received:
    34
    Occupation:
    Music Shop Owner
    Location:
    SP - Brazil
    Hi mate, sorry to bother but all my sites are made in Joomla, below you can see my htacess file, can you tell me were to add the code??

    Thanks and rep given
     
  8. HostStage

    HostStage Jr. VIP Jr. VIP Premium Member UnGagged Attendee

    Joined:
    May 20, 2010
    Messages:
    1,774
    Likes Received:
    1,731
    Occupation:
    BHW - CEO of Webhosting Company
    Location:
    BWH from France
    Home Page:
    @brseo you can place at the bottom of your file it will work perfectly :)
     
  9. aka sam

    aka sam Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 15, 2011
    Messages:
    3,811
    Likes Received:
    894
    Gender:
    Male
    Occupation:
    Internet Marketer
    Location:
    Black Hat World
    Home Page:
    Great, I will try some of these tips, great work :)
     
  10. mikkosoporno

    mikkosoporno Registered Member

    Joined:
    Mar 22, 2011
    Messages:
    67
    Likes Received:
    35
    • Thanks Thanks x 1
  11. midnight_focus

    midnight_focus Power Member

    Joined:
    Dec 2, 2008
    Messages:
    779
    Likes Received:
    480
    Location:
    blogger
    good guide thx
    I think there are some wp plugins that enhance the site speed
     
  12. ritesh

    ritesh Senior Member

    Joined:
    Oct 26, 2009
    Messages:
    1,046
    Likes Received:
    443
    initially it was 85.After following the tut its now 98 :D
     
    • Thanks Thanks x 1
  13. Nookie Monster

    Nookie Monster Senior Member

    Joined:
    Mar 28, 2010
    Messages:
    968
    Likes Received:
    463
    Location:
    USA
    Thanks for the education. I did know some of what you stated but not all.

    Thanks and +rep to you !
     
    • Thanks Thanks x 1
  14. nightbat

    nightbat Regular Member

    Joined:
    May 24, 2010
    Messages:
    304
    Likes Received:
    210
    Occupation:
    Magician
    Location:
    Ici!
    Superb post. Thanks and rep+ deservedly given.
     
  15. manugm94

    manugm94 Regular Member

    Joined:
    Oct 24, 2011
    Messages:
    340
    Likes Received:
    164
    Location:
    Spain
    WP Super Cache is the best plugin I've ever tried. It's easy to use and you can load your web in less than 1/2 time.
     
  16. judy314

    judy314 Newbie

    Joined:
    Oct 13, 2009
    Messages:
    18
    Likes Received:
    0
    Hi abysse,
    I follow your guide,add the code,use gzip test tool,it show yes,but when I test the page speed,it show no gzip,still red color,what's wrong?can you help?thank you.

     
  17. HostStage

    HostStage Jr. VIP Jr. VIP Premium Member UnGagged Attendee

    Joined:
    May 20, 2010
    Messages:
    1,774
    Likes Received:
    1,731
    Occupation:
    BHW - CEO of Webhosting Company
    Location:
    BWH from France
    Home Page:
    @judy i may need the URL of your website to have a closer look and the name of your hosting provider. Send me a PM.

    At first glance i would say it comes either from your provider, or you didn't refresh the page speed module :)

    You can try to clear your cache too from your browser.
     
  18. eterxx

    eterxx Junior Member

    Joined:
    Mar 25, 2011
    Messages:
    119
    Likes Received:
    45
    Occupation:
    a little bit of this, a little bit of that
    Page speed is very important, and not only for Google but also for your visitors.
    It's optimization really depends on the website structure itself: does it allow plugins? are there too many plugins? which plugin takes the more time to load? is the cache optimized? is the website too heavy? is the server optimized? is the server fast enough? are the pages compressed?
    Theses are some of the questions you need to ask yourself. It is really a big challenge sometimes to take a ~3seconds loading site down to 0.5sec (from a regular ADSL connection), and it takes a lot of time. But when you're done, then it's magic :)
     
  19. darkfury

    darkfury Regular Member

    Joined:
    Oct 23, 2008
    Messages:
    264
    Likes Received:
    141
    Location:
    Scotland
    If any of you guys are using Magento and have not set up memcache on your box, give it a shot
     
  20. yokolucu

    yokolucu Newbie

    Joined:
    Feb 17, 2008
    Messages:
    14
    Likes Received:
    1
    Basic .htaccess tricks can save a lot of memory in the server