The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Page Output Compression - Whitespace stripper. Details »» | |||||||||||||||||||||||||||
Page Output Compression - Whitespace stripper.
Developer Last Online: Jul 2012
No longer supported by the author.
Show Your Support
|
Comments |
#17
|
|||
|
|||
Quote:
|
#18
|
||||
|
||||
Quote:
|
#19
|
|||
|
|||
Quote:
To offer a proof I've done the following: wget my forum index.php both compressed using the now default non-aggressive regexp, and also without this hack applied. The sizes of the two files: 37,732 bytes = Compressed file 41,348 bytes = Uncompressed file A 9% reduction in filesize. I then ran gzip from within SSH, this should be the same as PHP gzip'ing them or a close approximation thereof: 6,748 bytes = Compressed + GZIP 8,102 bytes = Uncompressed + GZIP A 20% reduction in final filesize. The additional reduction of the size is higher than merely the white space being stripped and is an indicator that doing this does offer a benefit to GZIP. So the compressed page (exactly the same HTML but without white space) ends up being 20% lighter with GZIP'ing than the non-compressed page. Of course, the mileage varies on every page and with each style that you use. I should point out that the above was run against my current forum homepage which is not the default vBulletin style and that I've hacked my page quite a lot. So the filesize of your page and the amount it compresses and the amount it GZIPs are all factors depending on your configuration and the amount of whitespace in a page, etc. The worst I've seen from this hack is a mere 3% reduction in file size on some of the smaller pages (such as the error messages). The biggest benefit isn't the saved 1k of traffic... but the speed at which the rendering increases. Whether that is because the file transfered quicker, of the DHTML engine didn't have to work so hard ignoring whitespace, etc... I simply do not know... but it does appear to render faster and that is my prime goal |
#20
|
|||
|
|||
Of course... all of the above is simply a bigger advert for turning on GZIP than using this hack
If anyone doesn't have GZIP turned on in their vBulletin... I suggest you do that first |
#21
|
||||
|
||||
Ok, convinced. Thanks
|
#22
|
|||
|
|||
Unfortunately, this will also strip white space when editing posts. That's NOT good.
|
#23
|
|||
|
|||
Quote:
However the basic non-aggressive one will one strip excess space between ">" and "<". Unless you have HTML in your posts this shouldn't matter. Does this impact anything? Such as the WYSIWYG editor? I've been running it for a little while on my site and I haven't noticed any detrimental effects when editing posts. If you can give a detailed example I'll have a look and see what can be done about it. My site runs with a history of all edits (an edit log), so I can diff between changes to see how this effects it. |
#24
|
|||
|
|||
this lowered my homepage size by 3kb, it's a quick hack so worth the small effot
|
#25
|
|||
|
|||
Essentially it strips all returns out of posts when editing. In general, it's not a big issue but for long posts it's a little tiresome to have to go insert returns again. I did have the more aggressive version installed. I'll try the lesser one and see if that helps a little.
|
#26
|
||||
|
||||
Quote:
Quote:
|
#27
|
||||
|
||||
This hack have a good concept; but it is not the best way to preserve bandwidth...
For example; if your site is not webmaster oriented, your members will be unlikely to post as much HTML/other contents that needs trimming, thus it wouldn't affect your site as much. If your site is webmaster oriented, you will want to preserve the code the way it is (for demonstration and code representation purpose). The members will have a hard time trying to learn: Code:
<? if ( !$happy ) { print $sad_string; } ?> Code:
<? if (!$happy){print $sad_string;}?> And that's only a basic example, think what chaos it'd do with stuff like: Code:
if (!$a):$b or die(print($c)) |
#28
|
|||
|
|||
Oh absolutely.
But bandwidth preservation wasn't the #1 priority... delivery to the rendering engine and reduction of work for the rendering engine was. If you have a site that is going to use CODE tags, etc... then use the now defaulted 'lite' version. For those of you who do not post code, etc in CODE tags, and care not for <pre> tags... then the aggressive version will suit your needs and save a few more spaces. |
#29
|
|||
|
|||
And if you want to save bandwidth:
* Turn on GZIP * Remove images where you consider them excess * look at removing any redundent tags in the templates... you optimise the HTML Etc. Removing a few images will do more than this does... but this will help it display faster |
#30
|
|||
|
|||
for those having problems with the edit posts and new threads posts, PMS etc etc i have made this little addition that will switch to the light version if you view them pages (i think it works lol)
PHP Code:
i wrote that out really quick so sorry if its not coded proppa but you get the idea |
#31
|
||||
|
||||
I clicked Install !!!!!!!!!!!!! terrific! :laugh: :banana:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|