Get Latest Tweaks via Facebook, Twitter, Google+ & FeedBurner
    Subscribe:
    Subscribe Twitter Facebook

    Thursday, May 17, 2012

    Speed Up Your Website with simple tips

    SOCIALIZE IT →

    super speed your website

    Statistics show that you only have about 3 seconds to capture the attention of your website visitors before they get bored and go somewhere else. You have a lot to do within those first 3 seconds, and you don't want to waste it all on having to wait for your page to load.

    NOTE: To test my page load time, simply inserted the following code somewhere on my page:

    Load time: <?php timer_stop(1); ?>

    1. Cache objects


    The first time a person visits your site, the page requested may have to make many HTTP requests for stylesheets, javascript, images, flash, etc. By instructing your site to cache certain objects, a browser will only have to load these objects once. Subsequent page views by the same visitor will require much less requests, thus significantly reducing your page load time.

    here an .htaccess file:
    
    Header set Cache-Control “max-age=604800, public”
    
    

    The above code will cache all jpg, jpeg, png, gif, css, js and swf files for 1 week. For more information on enabling caching with .htaccess

    2. Merge all stylesheets & javascript


    It's a proven fact that a browser will load one large stylesheet much faster than multiple smaller stylesheets. The same goes for javascript files. so keep separate that only have components that are needed on a few pages of your site, so they only load when needed.

    3. Cut down your page content


    Many people who own blogs will display up to 10 posts on the same page. This is a lot of content to load. Instead, try cutting it down to 5 or 4. Chances are nobody is going to sift through 10 of your most recent posts anyway, and now your pages will load faster. better use 4 post per page.

    4. Compress images


    Image compression is a HUGE factor for most website owners. First off, you should never upload a large image then specify a smaller size in your HTML code. If you want to display an 800px wide image in only 400px, resize it on your computer first instead of specifying a smaller size in your code. In addition, many .png and .gif images can be compressed into smaller .jpg files and any transparent images that you have over a white background can have the transparency removed. By taking these steps, you will usually cut your image sizes at least in half!

    5. Cleanup code


    This is one step that never ends. There is always more room for improvement in your code.

    I constantly go through my theme’s files and remove duplicate and unused code. I also removed unnecessary comments and line breaks throughout the files thus reducing the size of each file. I would only recommend you try this step if you are familiar with PHP and HTML, otherwise you could really mess up your blog! Even if you do feel comfortable doing this, you should always backup your files anyway. I do this on a constant basis with all of my PHP, CSS and JS files.

    Be sure that you optimize your blog to load as fast as possible. Doing so will allow you more time to make a good first impression and will keep your regular visitors happy. You won’t lose your visitors before they ever get a chance to see your content, and the search engines will love you for it as well!


    2 comments:

    1. Excellent post. I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work.
      Web development Company

      ReplyDelete
    2. I usually don't comment on blogs but this blog inspired me to make one compliment as I know it's not enough for the meaningful context in your writing as one could understand it easily,
      Seo web services

      ReplyDelete