9 Simple Tips to Reduce Your Monthly Bandwith

There are many reasons by which you can face website downtime. May be due to the host server’s condition (for example, if it’s a shared server, the other web sites running on the same server will definitely slow things down) or your website configuration or maybe due to your code. It’s essential to play safe.

There are few thing you need to keep in mind before exploring these tips that many times it’s possible that few of the mentioned tips not work for your one particular website that does not mean it’s not going to work with any another of your projects.

In this article tips, we will share tips how to reduce your monthly bandwith for your websites.

1. Use CSS Text Instead of Images

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.

2. Make Sure to Optimize Your Images

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.

3. Compress Your CSS by Shorthand CSS Properties

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

…instead of

4. Remove All Unnecessary HTML Code, Tags, and White Spaces

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.

5. Learn How to Use Ajax and Javascript

AJAX is a technology for a web page to communicate with a server using JavaScript without reloading the page. In general, related pages on a website consist of much content that is common between them. Using traditional methods, that content would have to be reloaded on every request. However, using Ajax, a web application can request only the content that needs to be updated, thus drastically reducing bandwidth usage and load time.

6. Compress Your HTML and PHP with Gzip

Just like the CSS, your HTML can contain a lot of whitespaces and useless breaks. If you are using PHP then you can use mod_gzip for Apache to compress your content. Mod_gzip is a module for apache (existing on both windows and Unix/Linux versions of apache) that can significantly lower the size of a webpage on the fly, when it is requested by a browser that can understand compressed content (almost all modern browsers do support compression). Remember, the great thing is that the compression on the server is activated only if the browsers requests compressed content, in case the browser does not understand compressed content or does not request for it, the server simply servers plain, uncompressed content!

The easiest is way is by using a .htaccess file. I would recommend using .htaccess method because it’s very simple to implement and by .htaccess file you can further configure server configurations. Now to enable gzip compression add the following line to your .htaccess file.

Or in you can insert order for the PHP compression to work, you should insert the following line on the header of your webpages, on the top that is of your page:

7. Avoid Big Attachment

If the file you’re about to host on your server can be found elsewhere on the net, it maybe better to use the link of that location rather than hosting a copy of the file itself on your server. It will without any doubt cost you extra bandwidth but also increate server load. If nothing else, this will save you some time because you don’t need to upload file on your system.

8. Disable File Hotlinks

Hot Linking term is linking images or downloads from your website to other website(s). Basically the images are on your website and other websites just links image tags to your website, hence stealing your bandwidth. If people are ‘hotlinking’ to your image files, they are using your bandwidth which you will ultimately pay for.

You can stop this from happening by placing a ‘.htaccess’ file in the folder where your images are stored. This will only allow requests from your own pages to display the images – anyone linking to them from outside of your website, or any website you choose, will have the ‘red x’ instead of the image.

9. Use Hosting that Meet Your Requirements

It is very important to find hosting that meet your requirement. For example, if you want to upload big files like image, video, etc, then you need to find the hosting that allow you to host this files. Please make sure that your hosting permit you to upload this file. Instead of this permission, you also need to find reputable hosting provider.

Conclusion

If you want to make a high traffic website, blog or image gallery, then don’t just relay on your webhost but spend a little more time to optimize your website and server. Because if you don’t then you will be looking for a new and larger webhost for your website soon enough. Although it’s always recommended to use a good and fast host but applying these techniques will save you a lot of server load and bandwidth in no time.

 

 

Steve
Latest posts by Steve (see all)