Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-03 22:19:09

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Compress css, html code

I have nice idea – why not to include css, html compressor into engine? There are a lot of javascript and php scripts, that can allow to do this, for ex. http://www.lacocina.nl/vrijesoftware/cscssc/cscssc.js


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2007-08-03 22:47:22

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Compress css, html code

What’s the advantage (in numbers) over using gzip compression?

Offline

#3 2007-08-04 00:12:52

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Compress css, html code

ruud wrote:

What’s the advantage (in numbers) over using gzip compression?

http://www.lacocina.nl/vrijesoftware/cscssc/css-compressor.html
Not gzip! It just edits code so, that it size reduses by ~20% (5290b vs 7401b) for css. I think, that it would be nice to add such support to css: compressing is reverse operation, so we can save comperssed code in db, and if need decompress it to make human-readable.

And such support could me added for html output – after txp rendered site html code it could be “compressed” like css – end user will not mention the difference, but will see speed acceleretionin loading :))

Question about gzip – is there way to enable it? Does it need plugin, or it could be done only by hoster server options?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#4 2007-08-04 00:23:48

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Compress css, html code

php_flag zlib.output_compression On
php_value zlib.output_compression_level 5

add to your .htaccess

Offline

#5 2007-08-04 10:24:37

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Compress css, html code

OR…

<txp:php>ob_start('ob_gzhandler');</txp:php>

Also: phw_dtd

Offline

Board footer

Powered by FluxBB