MyBB Community Forums

Full Version: Save bandwidth with compressed html
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This modification will compress all the html myBB sends to a clients browser. When a page is built all white space is striped, this will make the output html smaller in size and thus you will use less bandwidth every time a page is called.

Most of the time html is coded in a easily readable format. This white space added for readability results in bigger file sizes. This hack will allow you to retain readable code in the admin cp while still saving the few kilobytes you lose when coding html with a lot of white space.

This will work with gzip compression, but might not have as much of an effect on the size. It may be overkill if you already use gzip, but the only way to find out is to try it yourself and see if there is any difference in file size.

To install download the text file attached and make the modifications, then load a page on your forum and view the source code, all white space should be striped.
I have updated the install.txt file with new code changes. Got it down to one add in one file Smile

Should work with every page, let me know if it breaks anything Smile