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

04 Tips to Reduce Server Load and Save Bandwidth

Discussion in 'Webhosting' started by Shahriar Islam, Mar 28, 2019.

  1. Shahriar Islam

    Shahriar Islam New Member

    01. Use CSS Text Instead of Images
    [​IMG]
    Images make your Web pages slower and consumes a lot of bandwidth of your server. Instead of using a background image, use the CSS code. For example if you want to use plain red background in your website then use CSS code background-color:#F00 instead of a red-bg.jpg. With CSS, you can set the background color or background image of any CSS element.
    These is a nice tutorial on CSS-Tricks.com about how wisely you can use your background images to reduce server load.
    02. Optimizing Your Images
    [​IMG]
    More than half of the bandwidth on most websites is used by images and optimizing images is the best way to improve the bandwidth used on your web server. Optimize your images for the internet and shrink their sizes as well, never use bitmap files (.bmp) as they are HUGE (mostly in MBs). You should use jpeg (.jpg) or gif (.gif) files for images as these are optimized for the internet. A good rule of thumb is to strive for no one image being larger than 10 Kb. This is especially hard with animations, but if you can do it, you’ll notice remarkable difference in bandwidth used of your server. There are various image conversion programs/softwares available all over the internet and there are various optimization programs too, be sure to get an optimization program that will be able to retain the images quality while drastically reducing its size.
    If you’re using Photoshop, use can compress your images by ‘Save for Web & Devices’ (Alt+Shift+Ctrl+S) option to optimize it for minimum bandwidth. When you have an image with lots of colours, you should go for JPEG or PNG. Play around with the quality to change the file size.
    Check out the Seventh Georgia Tech GVU WWW survey as quoted in “How Much is Too Much”.
    03. Compress your CSS by shorthand CSS properties
    [​IMG]
    CSS files can be pretty big, with lots of useless breaks and spaces. CSS shorthand properties are great! They’re a great way to reduce the amount of code contained in a CSS document, allowing for faster download times and easier editing. For example you can use
    Code:
    1

    Code:
    margin

    Code:
    :

    Code:
    2px

    Code:
    1px
    [size=undefined]

    Code:
    3px
    [size=undefined][/size]
    Code:
    4px
    [size=undefined][/size]
    Code:
    (

    Code:
    top

    Code:
    ,

    Code:
    right

    Code:
    ,

    Code:
    bottom

    Code:
    ,

    Code:
    left

    Code:
    )

    …instead of
    Code:
    1

    Code:
    margin-top

    Code:
    :

    Code:
    2px

    Code:
    ;

    Code:
    2

    Code:
    margin-right

    Code:
    :

    Code:
    1px

    Code:
    ;

    Code:
    3

    Code:
    margin-bottom

    Code:
    :

    Code:
    3px

    Code:
    ;

    Code:
    4

    Code:
    margin-left

    Code:
    :

    Code:
    4px

    There is a cool article written by webcredible.co.uk about CSS shorthand properties.
    You can also use the CSS Compressor from arantius.com to reduce the size of CSS file and unnecessary breaks and spaces.
    04. Remove Unnecessary HTML Code, Tags and White Spaces
    [​IMG]
    You can compresses your page size by removing unnecessary white space in your HTML files even remove comments (if not absolutely necessary) because every extra charecter means extra page size. Whether you use visual HTML editors or notepad, your HTML code contains unnecessary stuff: unneeded spaces, returns, meta tags, default values in HTML elements, etc. They will make your web pages bigger, without serving any real purpose. Bigger web pages takes longer to load, increases data traffic of your web server, and waste precious bandwidth.
    Wordoff is simple and useful web tool that lets you remove unnecessary tags and styles from HTML code. Most of us have to clean up the HTML code manually in our working life. This web tool definitely help all of us in that situation and you also find this worth bookmarking.

    Conclusion
    If you really want to make your server load fast and control huge number traffic you should consider Litespeed webserver as alternative of apache.It will make your site 10 times more faster.
    [/SIZE]
     

Share This Page