PDA

View Full Version : Simple ways of saving alot of bandwidth



Lingerance
2007-08-02, 03:53 AM
Format of this post is. . .
Time to implement: Description/actions
Note: Almost all the suggestions here involve HTML; also the firefox plug-in yslow rates this site as an F (yslow is for page loading times primarily but some of the things help bandwidth too).
Also, the main forum page is about 9KB of HTML alone, presuming the forum is the most accessed part of the site each KB saved is about 10% of bandwidth saved.

~5 Minutes: Move the CSS to it's own file, the web-server should know to set the cache settings for a CSS file to a decent setting, if not make a script output the CSS file with the headers for heaving caching (iirc php header() documentation has this information in one of the posts). This should save about 1KB per forum page request.

2-8 hours: adjust the HTML of the site so it's less bulky, a quick look at the source shows you're in-lining CSS into the HTML which is not that bad, but excessive use of it can rob bandwidth. Also DIVs tend to be more compact HTML wise than TABLEs are. This should save anywhere from 500B to 3KB.

I'll post an example of the size reduction when the caffeine will let me sleep, and I re-awaken. I should have fallen asleep 4 hours ago. . .

Rawhide
2007-08-02, 04:13 AM
The forum templates has not yet been successfully recreated using DIVs, if you would like to be the first, you can submit your design to vBulletin. It must be compatible with a certain range of browsers, the list of which vBulletin would be happy to supply you with.

Lingerance
2007-08-02, 04:09 PM
Actually, adjusting the side-bar navigation and moving the CSS (which was 5KB btw) I managed to shave about 6KB, off of the HTML page size. The vBullitin layout itself does use a fair amount of divs, and uses tables properly, the only thing that really needs to be edited would be the site's global header and footer (footer because of closing table tags). I'm presuming that the non-forum side of the site uses it's own header, while the forum section uses it's own as well (judging by the sources). It actually took me about an hour to fix up the side bar to use divs instead of the 3-4 levels of nested tables, which little over 1KB.

The resulting static page, with screen-shots of before and after: http://www.genoce.com/giantitp/

Since the headers are custom if I were to be able to receive them I would gladly edit them for you, although the easiest thing would to be moving the 5KB of CSS to it's own file and using this HTML tag to access it:
<link type="text/css" id="vbulletin_css" href="giantitp.css" rel="stylesheet" />

EDIT: For anyone else who runs a forum on thier site the majority of forum software I've used seems to prefer in-lining the CSS, which is of course a great way of burning your monthly limit because in-lined CSS is not cached while CSS in it's own file is normally (again check what your server does with CSS for caching).