By: testebr
Date: 2006-05-03
Time: 21:45
|
Compress template realtimeI have this function:
Where $output is my html code.. an simple echo and will show the final litte code. I'm noob with the TBS class. Can anyone make one 'hack' or an plugin for my code work? I use the TBS 3.0 This is useful for all. Thanks advanced |
|
By: Skrol29
Date: 2006-05-04
Time: 00:46
|
Re: Compress template realtimeYou can do a plug-in, but it is not a need.
Here is how you can do simply:
|
|
By: testebr
Date: 2006-05-04
Time: 14:33
|
Re: Compress template realtimeThanks a lot man, work fine!
This forum is very useful. |
|
By: testebr
Date: 2006-05-09
Time: 22:30
|
Re: Compress template realtimeHi again,
Anyone advanced wants make/convert this functions to one plugin? This is useful for all, it make compress 10%-15% in all pages. This is good to be default in the main TBS class. ;D I would like have this, but I'm not too much expert yet in php. |
|
By: Sheepy
Date: 2006-05-12
Time: 07:05
|
Re: Compress template realtimeYes it would be useful as a plugin, or perhaps even a default part of the HTML plugin, since it's small and is intended for (X)HTML only.
|
|
By: Skrol29
Date: 2006-05-12
Time: 11:28
|
Re: Compress template realtimeHi,
Ok, I'm preparing a plug-in for this. I will put it in beta first. |
|
By: TomH
Date: 2006-05-12
Time: 12:05
|
Re: Compress template realtimePlease help me, I don't undertand the reasoning behind wanting doing this. Is this because you are doing big XHTML pages?
Servers and browsers now can do page comperssion on the fly - doesn't that produce much better result for file size? Have you done any tests to see how much added server load it take to render the pages this way? That would be good to know about if you have done it. It seems to save bandwidth -- but maybe at the expense of much loading the server on every page view. If this were combined with caching maybe much better then. |
|
By: Scythe
Date: 2006-05-12
Time: 17:35
|
Re: Compress template realtimeWell, I currently use Gzip to compress files, and that's on the fly. That takes very little resources and compresses it quite well 25kb to 4.6kb.
However, the idea is to remove all whitespace, comments, etc. This would probably save the file .6kb. Now, that .6kb can add up. Depending on the size of the site, that .6kb can be huge. I plan on releasing my site to the public and get tons of visitors. I'd be very interested in this plugin if it was using regex expressions only (fastest, least amount of processing power). The current setup of that code is pretty large on the Big-O scale. Anyway, if someone wants to optimize that code, we could create a very efficient compression. |
|
By: Scythe
Date: 2006-05-12
Time: 17:37
|
Re: Compress template realtimeAlso, sorry about stating this on my last post: Older browsers and IE especially don't support Gzip. So, this would be a very useful bit of code for older browsers.
|
|
By: Skrol29
Date: 2006-05-12
Time: 17:45
|
Re: Compress template realtimeHi,
I must say I agreee with TomH. But I'll do the plug-in anyway as an illustration of plug-ins utility. |
|
By: Skrol29
Date: 2006-05-14
Time: 01:28
|
Re: Compress template realtimeHello,
You can test the Compact plug-in here: http://www.tinybutstrong.com/dev/tbs_plugin_compact.zip |
|
By: ioguix
Date: 2006-05-18
Time: 12:30
|
Re: Compress template realtimeHello,
I'm quite agree with TomH and Skrol29. Moreover, If you want to save some place in that way, you could just make a release of your pages directly without these spaces etc. It will be done just once by you instead of each time by the server when pages are requested... my 1.2ยข... ++ -- ioguix |
|
By: LeoC
Date: 2014-06-02
Time: 19:54
|
Re: Compress template realtimeFunny. This issue is currently discussed in SEO these days. Although the browser / server run a type of compression,
minifying the code (removing the spaces and unnecessary elements) combined with GZip compression helps to deliver faster pages. A plugin like this for HTML pages, would be a remarkable feature. |