Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2009-09-19 20:40:32

nik.martin
New Member
Registered: 2009-09-06
Posts: 8

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

I think I found out what’s up: If Site Wide Comments are on (Admin > Preferences > Basic > Accept Comments), then an <h2 id=“comment”> is placed the bottom of EVERY article, regardless if comments are on for that article or whether “One By Default” is set to No, whic it is in my site. I think this is a bug in TXP, so I’m gonna check there. Otherwise, this totally breaks ANY use of aks_header for linking to normally external file in txp.

Offline

#12 2009-09-19 23:35:43

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 564

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

Why is this any better than mod_gzip?

Offline

#13 2009-09-20 11:55:13

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

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

Because adding domain specific compression (stripping unnecessary spacing) works better than using only generic compression (gzip), although the compression rate of gzip + space-stripping is not really a lot higher than just using gzip, which is clearly visible in the test that’s included in the topic start. When not using gzip, stripping spaces gives 8% compression, but if you are already using gzip, stripping spaces only compresses 1% more. It’s an interesting experiment, but not worth it in reality.

Offline

#14 2009-09-20 15:33:21

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

nik.martin wrote:

I think I found out what’s up: If Site Wide Comments are on (Admin > Preferences > Basic > Accept Comments), then an <h2 id=“comment”> is placed the bottom of EVERY article, regardless if comments are on for that article or whether “One By Default” is set to No, whic it is in my site. I think this is a bug in TXP, so I’m gonna check there. Otherwise, this totally breaks ANY use of aks_header for linking to normally external file in txp.

Set (Admin > Preferences > Basic > Automatically append comments to articles? – NO)

or

Temporary solution – edit Form “comments_display” and add some if tags.
For example <txp:if_comments_allowed><h2 id="comment">....</h2></txp:if_comments_allowed>

.

.

Possible it’s TxP bug or I understand TxP logic. :(

File /textpattern/publish.php, code from function doArticle

if ($use_comments and $comments_auto_append)
{
        $article .= parse_form('comments_display');
}

Possible this code need change to:

if ($use_comments and $comments_auto_append and $thisarticle['annotate'])
{
        $article .= parse_form('comments_display');
}

Last edited by makss (2009-09-20 15:36:57)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#15 2009-09-20 15:59:12

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

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

I’d rather see the entire auto_append stuff removed from preferences. It’s the cause of a lot of confusion.

Offline

#16 2009-09-20 16:23:19

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 564

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

ruud wrote:

Because adding domain specific compression (stripping unnecessary spacing) works better than using only generic compression (gzip), although the compression rate of gzip + space-stripping is not really a lot higher than just using gzip, which is clearly visible in the test that’s included in the topic start. When not using gzip, stripping spaces gives 8% compression, but if you are already using gzip, stripping spaces only compresses 1% more. It’s an interesting experiment, but not worth it in reality.

Any idea how much of a server drain would this plugin method present over mod_gzip? I wouldn’t imagine it to be a lot, but every bit does make a difference.

Offline

#17 2009-09-20 17:49:27

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

ruud wrote:

I’d rather see the entire auto_append stuff removed from preferences. It’s the cause of a lot of confusion.

Agreed :)

Offline

#18 2009-09-20 17:55:16

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

TheEric wrote:

Why is this any better than mod_gzip?

aks_header stripping unnecessary spacing, that gives a few the byte of economy and much aesthetic pleasure to view of html source. :)

aks_header use same gzip compression method as mod_gzip. If you do not need strip, then use mod_gzip, because mod_gzip module of Apache and works a bit quick.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#19 2009-09-23 09:18:54

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,307
Website

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

Hi makss,

There is a problem with your plugin, i used it at my blog : info.ix-dz.com, all seems to works well, until i tried to download some files from the site, the download gives me blank files, i have thinked that it was an htaccess issue, but even with messy url it’ not work, when i desactivated your plugin, all become right!

Hope that help.
Problem occured with 4.0.6, and after upgrad to 4.2.0 the problem still the same.

Offline

#20 2009-09-23 10:19:13

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip

Dragondz wrote:

Hi makss,
There is a problem with your plugin, i used it at my blog : info.ix-dz.com, all seems to works well, until i tried to download some files from the site, the download gives me blank files

Thanks for feedback, fixed in aks_header 0.3.3a

Last edited by makss (2016-01-16 18:37:02)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

Board footer

Powered by FluxBB