![]() |
Quote:
|
With GZIP enabled, this hack is almost redundant ... the savings equate to about 1% or so over and above a GZIPPED page. The reported savings on a GZIP Enabled board are also bogus because it reports the size difference before being put thru GZIP.
|
Quote:
If you ZIPed a Microsoft Word document, would it be redundant to remove a few pages of the original document just because you ZIPed? If you remove some pages before the compression, the ZIPed outcome will become smaller, it is simple aritmetic. But you don't agree, please uninstall it. It is not mandatory to use it.. |
Logician,
I'm not saying that it is 100% redundant but it makes very little difference if you've got gzip turned on ... I tested with gzip on with and without this and the difference is extremely small. It also has bugs that make it a big pain to use on some pages. I'm not complaining, just trying to give a bit of constructive criticism as with a bit of tweaking I can see this being of use to some people. |
I still can't explain why some threads become wide. Any ideas? The only one I can think of is carriage breaks caused by spaces in HTML are removed.
|
Quote:
|
Quote:
I'm not able to track/debug it because I have never experienced such a problem in the boards I have installed the hack. The only display problem I witnessed and reported in the FAQ is the page split links getting closer to eachother. |
BTW. please note I have never tested it in VB3 which may be the reason of your problem..
|
Ok, I've worked out what was causing the really wide tables in my case. I'll post a fix in the next 48hrs.
|
whoa! Damn it does load faster! =o
Thanks for the hack. ^__^ |
Quote:
|
I added this to a project I'm currently working on ... and I think it's great.
I modified the expression ... $vartext = preg_replace ("'([\r\t\n])[\s]+'", "", $vartext); this has been tested only on a non-public vb3 forum it seems to compress more then the original (view attachment) and it doesn't remove the "space" between the .... |
Quote:
But I'm confused how come it compresses more than my line as your line seems to remove successive spaces and my line removes them all. BTW it is also weird the original source sizes are different in your each screenshots (as if they belong to different pages?).. :) |
Currently, I have the compression as selectable by admin (in case of high server load).
I admit most of the compression is done in the <head> CSS section. ;) (I'm using vb3.) Quote:
I must have minimized a block ... new screenshots attached. |
I dont like the way this shrinks the page numbers in the thread list I.E. 1234 instead of 1 2 3 4
|
*** Installed ***
Thanks reloaded the first page and already see how much was saved, Thanks. Simple yet very very effective. |
Quote:
|
Quote:
To do this go into your ADMIN PANEL and do a search and replace for Search for text: <script type="text/javascript"> <!-- Replace with Text: <script type="text/javascript"> Search for text: //--> </script> Replace with: </script> You can also do this for <style> but it is not necessary as <style> will work when compressed. If you think the comments are necessary think again ... Comments are used to hide code from version 1 and 2 browsers. How many users do you think will visit your site with a 1 or 2 browser? And, if so, the site will not work as it should because they will not be able to interpret the javascript. A condtional statement checking for browser version should be used to render or not render javascript. Why send javascript bytes that will not be utilized by browser? |
Broke too much of my spacing, and I don't have enough time to redo it all right now. Awesome idea though, I had a 3.6% save.
Maybe I'll give this other compression method a try one day. |
Unfortunately the compression method of princeton creates problems in javascripts as he mentioned above. I confirmed that it compress better and fixes spacing problem but I believe trying to fix all javascripts in all templates is an headache so I prefer to use my compression method. Your call which one you want to use but make sure you fix your javascripts in princeton's method otherwise some features of your board (eg. smilies) will stop.
Frankly speaking I don't see spacing as a problem. It neither interferes with how board functions (it is just visual) nor hard to fix. I dont know how it will do if you have skins or something but in a default vb, it just affects page numbers which is very easy to fix with a one template edit. |
In vB3, you have more control of Search and Replace.
It's only a headache if you don't know how to use it properly. (It takes some time to get use to it.) In vB3, you'll find that it has a lot of javascript/comments and "empty" space (found in rendered html source) caused by conditionals. Remove all these space/lines/comments and your site will load quicker and save on bandwidth. - every little bit counts |
Quote:
Thanks for a very helpful hack. My site is using 80 - 90% of two T-1's and a 5% or 6% reduction is bandwidth is meaningful. Eric |
Sorry
Is it available VB3 RC4 ? Thanks |
Quote:
|
How do you implement this in VB3 gold?
|
Welp, this screwed up my board a good bit so I removed it, and now many of my templates have added spaces when they didn't before. So now I have to spend a number of hours going back to fix them. On top of that, my CMPS templates have screwed up colors in IE now. Since I'm running Gzip, I don't see the benefit. I guess I should have realized that before installing this hack.
|
Quote:
|
hmmm, interesting. It wasn't happening before the hack, and everything is still screwed up after removing it. I haven't missed anything on the install or removal so I know the hack is completely gone, yet some of my formatting is still messed up. It has obviously done SOMETHING to my forum. Whatever that is yet, I have yet to discover. I'm not sure if mmcache could be having an issue or not but when I put the hack back, the stuff that's screwed up now goes back to normal, and of course I lose spaces all over the place on the other stuff. Don't know what to tell ya, but the hack did cause this problem.
|
This question might not belong here, so if it does not please remove it.
Let's say I wanted to remove empty excessive white space. So in the code if you see <br /> <br /> <br /> (ie <br /> three times in a row) how would you remove it so that you can have a max of two in a row. I need this because, everytime the editor edits an html marked up post, at the end of each line it adds <br /> making the post huge if edited a few times |
All times are GMT. The time now is 01:06 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|