10 Best practices to Improve Your Website Performance

Discussion in 'Web Development and Programming' started by Brandon, Jul 9, 2010.

  1. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,706
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    Here are the 10 simple steps to increase your website performance.

    1. Optimize your web page components.
    Identify the components, such as images, css files, html pages and JS files, that take a long time to load. To identify the problematic components, use tools like firebug for a quick and easy method. Make sure you have a fast loading website and limit the page to 19-25kb.

    2 Avoid inline styling and inline JavaScript code.
    Don’t use inline CSS and javascript in your HTML document instead use external css and javascript files, because your HTML code will weigh more, i.e. a web page riddled with similar code will have a KB size that is a lot larger than necessary.

    3. Avoid CSS Expressions
    One way to reduce the number of times your CSS expression is evaluated is to use one-time expressions, where the first time the expression is evaluated it sets the style property to an explicit value, which replaces the CSS expression.

    4. Simplify tables and avoid nested tables
    (tables within tables).
    In general, the best way to design tables for visual and non visual users is to simplify the layout as much as possible. Avoid placing one or more tables inside on another – hence, “nesting.” …for those who don’t know ;) … The more tables that are nested, the longer it will take for the Web browser to render the Web page.

    5. Specify image WIDTH and HEIGHT attributes for faster loading in the browser.
    If you want to increase the size of the images in your web pages don’t use the Width and Height attribute instead use a image editor to shrink it.

    6. Reduce DNS Look ups
    The domain name System (DNS) maps hostnames to IP addresses just like phonebook maps people’s name and their address. When you type in your domain name into your browser, a DNS resolver contacts the browser to return with the servers IP. Usually the browser takes some time to complete this process. Reducing the number of unique hostnames has the potential to reduce the amount of parallel downloading that takes place in the page. Avoiding DNS lookups cuts response times.

    7. Reduce 301 and other kinds of redirects
    Redirects of a web page can be done in server ways like 301 and 302. Meta refresh tag and JavaScript are other ways to direct users to a different URL. The whole purpose of a Redirect is to connect the old web page to a new URL. But reducing this to a minimum is the best practise to increase the performance of a web page.
    Redirects slow down the users experience because inserting a redirect between the user and the HTML document delays everything in the page since nothing in the page can be rendered and no components can start being downloaded until the HTML document has arrived.

    8. Remove Duplicate scripts
    It is not a good practise to include multiple versions of the same JavaScript in a single page. Duplicate scripts increase unnecessary HTTP requests during page loading. Even if the script is cacheable, extra HTTP request will occur when the user reload the page.

    9. Minimize the Number of iframes
    Inline Frames (IFrames) are windows that cut into your web page that allow your visitor to view another page on your site or off your site.

    10. Reduce Cookie Size
    HTTP cookies are used for several reasons – information about cookies is exchanged in http headers between a web sever and browser. Making the cookie size as small as possible to reduce the impact on the users response time.

    [Source..]
     

Share This Page