View Full Version : [Article] Bandwidth Conservation Measures


Floris
5th July 2004, 12:53 PM
[Article] Bandwidth Conservation Measures

We bring you an indepth article shared by Kathy from The Admin Zone, expanded by Floris from vBulletin.nl for Administrators who use vBulletin and have to find a way to cut down on the traffic it generates each month.

As you spend your time and money building your on-line community, adding content, contacting search engines and working on building your traffic, at some point you will need to consider "How successful is my site right now, how can I speed it up and what measures can I take to cut down on the traffic?" So let's give you some pointers.

Enjoy!

Author(s): Kathy (First Part) / and Floris (Second Part)
Website: http://www.theadminzone.com/ - http://www.vbulletin.nl/



Here's a few things that you can do to your forum to save on bandwidth.

- GZIP

If you have a GZIP feature in the AdminCP, enable it and set it to level 1. Make sure your server has GZIP installed. This will save quite a lot of bandwidth.

If you have access to your server shell, install mod_gzip for your entire server. (Be sure and turn *off* the gzip in your vbulletin control panel though. Do not have them both enabled).

- Cut down on images.

The main image to cut down first is the top banner. It is viewed on every page and for most forums, it is usually over 30kb, in some cases around 100kb! The best thing to do is design a header to your forum that doesn't require an image of that size; try just having a small logo of around 15kb at the most. This will save significant bandwidth. Other images to cut down on are for example the post images, such as the buttons linking to the homepage of the user, pm link, email link, search posts link, and so on. If you make these text, a lot of bandwidth will be saved, if you have a large forum, you may not realise it but these few little buttons do add up the bandwidth.

We know that some webmasters love to load up a site with gorgeous graphics taking talent and energy to create in photoshop. Be aware, however, that all those graphics are loaded into the page with every visit of every visitor and with every page read. It all adds up!

- Create a 'lite style'

Set the more graphical style as an option for premium members or subscribers or something. The lite style should be low on images and such, therefore not only is it good for 56k users, but is also less of a burden on your bandwidth.

- Block spiders from specific area of your site

One of the simplest fixes to reducing bandwidth overheads is to use a robots.txt file to block spiders from specific areas of your forums.

The simplest would simply block spiders from your images - other forms would block entire areas of your forums from spiders...but more for reasons of channelling PR to your content - for search engine optimisation purposes - rather than to simply save on bandwidth. :)

In case anyone is curious, this is an example robots.txt file to block spiders accessing your graphics:


User-agent: *
Disallow: /forum/images/


And this is an example of a robots.txt used to focus PR into your thread content:


User-agent: *
Disallow: /forum/attachment.php
Disallow: /forum/avatar.php
Disallow: /forum/editpost.php
Disallow: /forum/member.php
Disallow: /forum/member2.php
Disallow: /forum/misc.php
Disallow: /forum/moderator.php
Disallow: /forum/newreply.php
Disallow: /forum/newthread.php
Disallow: /forum/online.php
Disallow: /forum/poll.php
Disallow: /forum/postings.php
Disallow: /forum/printthread.php
Disallow: /forum/private.php
Disallow: /forum/private2.php
Disallow: /forum/report.php
Disallow: /forum/search.php
Disallow: /forum/sendtofriend.php
Disallow: /forum/threadrate.php
Disallow: /forum/usercp.php
Disallow: /forum/admincp/
Disallow: /forum/modcp/
Disallow: /forum/images/
Disallow: /forum/sendmessage.php
Disallow: /forum/register.php
Disallow: /forum/subscription.php


A robots.txt file is nothing more than a text file of that name, dropped into your main HTML root folder. Most reputable spiders will obey it.

-Prevent Hotlinking by others

Check through your domain logs and look for excessive image usage and follow the links if they indicate your images are showing up on other websites. This can easily be stopped by adding an .htaccess file to the root directory, making sure that no domain other than yours can view your images.


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://12.34.56.789/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]


Be sure and replace "domain.com" with your own.

Take precautions to protect your bandwidth and save on webhosting costs monthly.


Thanks to N9ne and Brian Turner for submitting info regarding bandwidth.
Copyright (c) 2004 The Admin Zone. All Rights Reserved.



It is definitly worth it to take about 5 minutes to walk through the vBulletin Options groups and read carefully what it says there for each setting. It can certainly have impact on the total performance of your site, as well as help you save traffic.

A few examples:

Store Stylesheets (CSS) as file
Instead of throwing all that CSS code inside each page that gets rendered, check the optiont to save the CSS as a file, this way it saves you quite some traffic generated by each file.
Admin Control Panel > vBulletin Options > vBulletin Options > Style & Language Settings > Store Stylesheets (CSS) as file : Yes

Remove Redirection Message Pages
Turning his option on will remove the redirect pages that are displayed after a user action. This will definitly speed up posting behaviour and saves traffic for sure.
Admin Control Panel > vBulletin Options > vBulletin Options > Cookies and HTTP Header Options > Remove Redirection Message Pages : Yes

Cached Posts Lifespan
This may require twice the storage space, but this makes threads faster to display. From the admin-help: Posts are normally stored with bbcode tags etc. in the same form as the user posted them with so that it may be edited later, and then parsed at display time. By caching them, they are parsed at post time (instead of display time) into the HTML they will be displayed in and stored separately from the pre-parsed posts. This results in a faster display on threads, since the posts do not have to be parsed at display time. If you have the disc space, you can set this to a higher value for better performance.Admin Control Panel > vBulletin Options > vBulletin Options > Server Settings and Optimization Options > Cached Posts Lifespan : 30

Add no-cache HTTP Header
If you want to save bandwidth, server load and traffic, turn this off!
Admin Control Panel > vBulletin Options > vBulletin Options > Cookies and HTTP Header Options > Add no-cache HTTP Header : No

Set your options and limits for Attachments
Go through the vBulletin Options and the Attachment Extentions to make sure you have the settings setup just the way you want to. You can deny showing images inline in posts (so they only show up as text links) and you can limit how images show up, their maximum width and height. This can save you quite some traffic in the long run. Especially on active forums.

As you can see, if you take some time to go through some settings and options, you can save traffic, improve performance and optimize your end-user experience.



© Copyrights 2004 Kathy, RN_Evil, Floris & http://www.vBulletin.nl/ (http://www.vbulletin.nl/)
Original thread: http://www.theadminzone.com/forums/showthread.php?t=886 (http://www.theadminzone.com/forums/showthread.php?t=886)
vBulletin.nl thread: http://www.vBulletin-Fans.com/showthread.php?t=5548 (http://www.vBulletin-Fans.com/showthread.php?t=55480)


You can discuss this article here (http://www.vBulletin-Fans.com/showthread.php?t=5549)


Floris & Staff