Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
If you have Firefox, install the addon webdeveloper toolbar.
If installed you will find in the toolbar under »information« the last point »Show Response Header«. If you find a Content-Encoding: gzip in the output, so gzipping is enabled.
Very cool! Yet another feature of the Web Developer toolbar that I hadn’t discovered.
I’m just now getting hip to the whole speed optimizing/gzip thing. I see that when mod_gzip isn’t available, aks_header is an excellent alternative for gzipping your html. Any recommendations on combining/gzipping multiple css and javascript files? In general I don’t manage my css through Textpattern’s Style tab, just keep it external.
Thanks for everyone’s help.
Offline
#32 2009-10-01 17:15:15
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
nabrown78 wrote:
Is there any easy way to determine if a site is using gzip already?
Google says: Online gzip test
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
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Thanks I just found that handy tool. I also came across this post about combining and gzipping css and js on this forum. The page it refers to seems to present a good option for those of us who don’t have mod_gzip available.
Offline
#34 2009-10-02 10:50:38
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Thanks I just found that handy tool. I also came across this post about combining and gzipping css and js on this forum. The page it refers to seems to present a good option for those of us who don’t have mod_gzip available.
nabrown78, Thanks for links.
Warning in combine.php small bug. Need change line
if ($version == 6 && !strstr($_SERVER['HTTP_USER_AGENT'], 'EV1'))
to
if ($version == 6 && !strstr($_SERVER['HTTP_USER_AGENT'], 'SV1'))
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
#35 2009-10-02 11:12:27
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
- Check for buggy versions of Internet Explorer
Last edited by makss (2016-01-16 18:40:15)
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
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Am I correct in my assumption that aks301 can only forward to a specific page?
What I am needing is the ability to forward an old section to a new section…
ie… section “blog” is changing to section “news”… I need
http://www.domain.com/blog/blog-title
forwarded to…
http://www.domain.com/news/blog-title
Is there a way aks301 can do this that I am missing?
If I am correct in my assumption can y’all think of a plugin that will do this?
thanks!
Offline
#37 2009-10-09 19:59:11
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
egyarnetsky wrote:
What I am needing is the ability to forward an old section to a new section…
ie… section “blog” is changing to section “news”… I need
http://www.domain.com/blog/blog-title
forwarded to…
http://www.domain.com/news/blog-title
upgrade plugin to 0.3.4a, and try it
<txp:aks_301 start="/blog/(.*)$" url="http://www.domain.com/news/$1" />
Other sample:
http://www.domain.com/blog/some-text/blog-title
forwarded to…
http://www.domain.com/news/blog-title/some-text
<txp:aks_301 start="/blog/(.*?)/(.*)$" url="http://www.domain.com/news/$2/$1" />
.
New version aks_header 0.3.4a- Added mask for redirect in aks_301 tag
Last edited by makss (2016-01-16 18:40:38)
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
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Thank you very much! It looks like it will fit the bill perfectly.
I’m getting back to my main project after a side trip, so I’ll install and try this out.
Update
It’s not working for me at the moment. I’m going to check with my sysadmin to see if anything he implemented may be conflicting before taking the next step.
Last edited by egyarnetsky (2009-10-14 18:45:40)
Offline
#39 2010-02-11 10:28:53
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
New version aks_header 0.3.5
- Added mask for redirect in aks_301 tag
- Added attributes
ignoreandblackto aks_301 tag - Fixed bug in strip function.
Last edited by makss (2016-01-16 18:41: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
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Hi makss,
Just found some weird output on a site where I was using this great plugin. It seems to be stripping whitespace from inside <pre> blocks so they lose their formatting a little. e.g. instead of rendering:
<pre><code>my
multiline
</code>
<code>code block
</code>
<code>with
</code>
<code>a couple of
</code>
<code>rows
</code></pre>
I get:
<pre><code>my
multiline
</code> <code>code block
</code> <code>with
</code> <code>a couple of
</code> <code>rows
</code></pre>
Which renders differently in the browser. Anything I can do to get round this? If I use nostrip="pre" it renders fine but if I use nostrip="pre,code" or leave it as default, it doesn’t. Any ideas?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#41 2010-07-28 12:04:00
- makss
- Plugin Author
- From: Ukraine
- Registered: 2008-10-21
- Posts: 355
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Bloke, thanks for feedback. Now this bug fixed. :)
New version aks_header 0.3.6
- Fixed bug in strip function.
Last edited by makss (2016-01-16 18:41:33)
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
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Maybe I’m not using this in the way it was intended or possibly just plain wrong but what I want it to do is redirect the main /subscribe page to a different url (which works great) but any other existing pages should not be redirected.
<txp:aks_301 start="/subscribe" ignore="/subscribe/" url="/members/signup.php" />
This produces the correct behavior for url.com/subscribe (redirects) and url.com /subscribe/ (doesn’t redirect) but not for url.com/subscribe/policies (redirects this page)
I’ve eve tried this (ignoring a specific already existing url) but it still redirects the policies page:
<txp:aks_301 start="/subscribe" ignore="/subscribe/policies" url="/members/signup.php" />
Any thoughts on what I’m doing wrong?
Edit — it appears to have been a weird caching issue, not sure if it was my browser or Textpattern, but it’s resolved itself and the <txp:aks_301 start="/subscribe" ignore="/subscribe/" url="/members/signup.php" /> is working as expected.
Last edited by visualpeople (2010-09-30 07:33:43)
Offline
#43 2010-10-18 13:49:19
- element
- Member
- Registered: 2009-11-18
- Posts: 99
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Not sure if it fits here but is there a way to properly do a 301 redirect from www to non-www with textpattern?
If I change my .htaccess I get weird results like index.php getting added to the url.
Offline
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
element wrote:
Not sure if it fits here but is there a way to properly do a 301 redirect from www to non-www with textpattern?
If I change my .htaccess I get weird results like index.php getting added to the url.
doesn’t fit in this thread:) Did you try…
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1/$1 [R=301,L]
or
RewriteEngine On
RewriteCond %{HTTP_HOST} !^your-site.com$ [NC]
RewriteRule ^(.*)$ http://your-site.com/$1 [L,R=301]
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#45 2010-10-19 08:57:40
- element
- Member
- Registered: 2009-11-18
- Posts: 99
Re: aks_header : Compress your pages on the fly. Strip white spaces + gzip
Of course I tried. Why does index.php get added when it converts from www to no www?
Don’t want to hijack the thread, so I started a new one here: http://forum.textpattern.com/viewtopic.php?id=34809
Last edited by element (2010-10-19 09:18:31)
Offline