<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>
<channel>
	<title>G-Loaded Journal &#187; Optimization</title>
	<atom:link href="http://www.g-loaded.eu/tag/optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Mon, 05 Dec 2011 19:55:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>Using SSH for networking</title>
		<link>http://www.g-loaded.eu/2008/05/16/using-ssh-for-networking/</link>
		<comments>http://www.g-loaded.eu/2008/05/16/using-ssh-for-networking/#comments</comments>
		<pubDate>Fri, 16 May 2008 00:13:02 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Servers]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=474</guid>
		<description><![CDATA[This is mainly a note to myself about two patches, just in case I ever decide to use OpenSSH for networking, in addition to remote administration. First, is the cipler-none patch that adds none as a valid argument to the -c command line option. By using it, the transferred data is not encrypted. Pros: eliminates [...]]]></description>
			<content:encoded><![CDATA[<p>This is mainly a note to myself about two patches, just in case I ever decide to use <a href="http://www.openssh.org/">OpenSSH</a> for networking, in addition to remote administration.</p>
<p><strong>First</strong>, is the <strong>cipler-none</strong> patch that adds <code>none</code> as a valid argument to the <strong>-c</strong> command line option. By using it, the transferred data is not encrypted. <em>Pros</em>: eliminates the data encryption overhead. <em>Cons</em>: totally insecure method of transferring sensitive data.</p>
<p><a href="http://arctic.org/~dean/patches/openssh-3.8.1p1-cipher-none.patch">cipher-none-patch</a></p>
<p><em>Note</em>: the OpenSSH server, even if it has been patched with this code, does not accept unencrypted connections by default. This has to be enabled explicitly in the sshd configuration (<code>sshd_config</code>) by adding the <em>none</em> &#8220;cipher&#8221; to the list of the accepted ciphers:</p>
<pre class="codesnp">Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,none</pre>
<p><em>Note2</em>: here is <em>step-by-step</em> guide how to configure the <em><a href="http://www.g-loaded.eu/2005/11/10/ssh-with-keys/">SSH authentication using public keys</a></em>.</p>
<p><strong>Second</strong>, is a set of patches, created at the <a href="http://www.psc.edu/">Pittsburgh Supercomputing Center</a>, which eliminate the bottlenecks caused by some of the internal buffers that control data flow in network connections through OpenSSH. This project is called <a href="http://www.psc.edu/networking/projects/hpn-ssh/">High Performance SSH/SCP</a> (aka <em>HPN-SSH</em>). Benchmarks show that even encrypted network connections using HPN-SSH perform extraordinarily better than the usual encrypted OpenSSH connections.</p>
<p>OK, this info exists here for completeness, as those HPN-SSH patches <em>have not been designed for home networks</em>! Possibly it might make no difference if you use the regular OpenSSH or HPN-SSH in your home LAN.</p>
<p><em>Note</em>: the HPN-SSH patches also contain code that adds the <em>none</em> cipher, similar to the <em>cipher-none patch</em>, so, if you intend to use HPN-SSH, it is not required to apply both on the OpenSSH source.</p>
<p>Finally, apart from all these, if you ever decide to use SSH for networking seriously consider using <a href="http://fuse.sourceforge.net/sshfs.html">SSHfs</a> (see also <a href="http://fuse.sourceforge.net/wiki/index.php/SshfsFaq">SSHfsFAQ</a>).</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/05/16/using-ssh-for-networking/">Using SSH for networking</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2011/09/27/mod_gnutls-rc4-cipher-beast/" rel="bookmark">How to configure mod_gnutls to use the RC4 cipher to mitigate the SSL/TLS vulnerability</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/05/assign-virtual-ips-to-your-nic/" rel="bookmark">Assign Virtual IPs to your NIC</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/10/ssh-with-keys/" rel="bookmark">Setup the SSH server to use keys for authentication</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/10/encrypt-devices-using-dm-crypt-and-luks/" rel="bookmark">Encrypt devices using dm-crypt and LUKS</a></li>
<li><a href="http://www.g-loaded.eu/2006/11/05/truecrypt-on-2618-kernels/" rel="bookmark">TrueCrypt on 2.6.18 kernels</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/05/16/using-ssh-for-networking/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Fast-Static-Feed WordPress Plugin</title>
		<link>http://www.g-loaded.eu/2008/05/10/fast-static-feed-wordpress-plugin/</link>
		<comments>http://www.g-loaded.eu/2008/05/10/fast-static-feed-wordpress-plugin/#comments</comments>
		<pubDate>Sat, 10 May 2008 04:44:56 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Syndication]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=493</guid>
		<description><![CDATA[Syndicated content has almost become the standard way of distributing web content nowadays. WordPress can deliver its content in various different feed formats -RSS 2.0, Atom 1.0, RDF, RSS 0.92- and can generate feeds for both the published posts -grouped by time, category, tag, author etc- and the comments that have been submitted by readers. [...]]]></description>
			<content:encoded><![CDATA[<p>Syndicated content has almost become the standard way of distributing web content nowadays. <a href="http://wordpress.org/">WordPress</a> can deliver its content in various different feed formats -<em>RSS 2.0</em>, <em>Atom 1.0</em>, <em>RDF</em>, <em>RSS 0.92</em>- and can generate feeds for both the <em>published posts</em> -grouped by <em>time</em>, <em>category</em>, <em>tag</em>, <em>author</em> etc- and the <em>comments</em> that have been submitted by readers. Moreover, some <em>RSS add-on modules</em> are being used in the generated feeds, so that modern feed readers can even retrieve the submitted comments for each of the feed entries. It is obvious that all these features greatly enhance the user experience, but, on the other hand, depending on the website&#8217;s traffic they might increase the server load and thus the content delivery times.</p>
<p>Taking these things into consideration, I decided to write <strong><a href="http://www.g-loaded.eu/2008/05/10/fast-static-feed-wordpress-plugin/">Fast-Static-Feed</a></strong>, a plugin that can <strong>cache</strong> the site&#8217;s entries feed, and deliver a static XML file instead of constantly generating the feed content on every client request. This, combined with the fact that the web server can <a href="http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/">compress the web content on-the-fly</a>, has greatly reduced the waste of bandwidth and system resources.<br />
<span id="more-493"></span></p>
<h4>How it works</h4>
<p><strong>Fast-Static-Feed</strong> performs the following actions:</p>
<ul>
<li>Every time a post is <strong>published</strong> or an already published post is <strong>edited</strong>, the plugin dumps the <em>entries feed</em> (that is the feed of the blog posts) to a file. This way, the static XML file is always contains the most fresh content of your blog.</li>
<li>Every time a feed is requested, instead of re-generating the XML content over and over, this plugin delivers the static XML file. This is <strong>completely transparent</strong> to the client as there are no HTTP redirects involved. Your content is just being delivered faster!</li>
<li>If the plugin is enabled, but the static files have not been created yet, the plugin will try to generate them automatically. Upon failure to do so, a <code>404 Not Found</code> HTTP error code will be returned to the client.</li>
<li>It also checks if the client&#8217;s request includes the <a href="http://www.g-loaded.eu/2005/10/19/the-if-modified-since-http-header/">If-Modified-Since</a> HTTP header and, in such a case, it checks the static file&#8217;s <strong>modification time</strong>. If the client&#8217;s cache is current, it just returns a <code>304 Not Modified</code> status to further reduce bandwidth usage.</li>
</ul>
<p>The plugin caches all four types of feeds WordPress supports -<em>RSS 2.0</em>, <em>Atom 1.0</em>, <em>RDF</em>, <em>RSS 0.92</em>-.</p>
<p>Only the feeds that contain your blog posts are cached. The comments feed, each individual post&#8217;s comments feed, feeds for categories, tags, authors etc are <strong>still generated dynamically every time they are requested</strong>.</p>
<p>This plugin <strong>does not interefere in any way with the generation of <em>rewrite rules</em> and the generation of your site&#8217;s feed links</strong>.</p>
<h4>Configuration</h4>
<p>Generally, the plugin does not require any configuration in order to work.</p>
<p>One <strong>mandatory prerequisite</strong> is that the <code>wp-content/</code> directory is <strong>writable by the web server</strong>. If it is not, the plugin will not be able to create the static files and, consequently, the clients who request a feed will receive a <code>404 Not Found</code> HTTP code.</p>
<p>Furthermore, there are two options within the source code <code>fast-static-feed.php</code> that can be set.</p>
<pre class="codesnp">
// By default, the WordPress feeds contain elements of the 'wfw' namespace
// (CommentAPI), so a feed reader can fetch each feed entry's comments.
// By setting the following to 1, these elements will be stripped
// from the static feed.
// It is recommended to set this to 1 in order to save bandwidth.
// More info: http://wellformedweb.org/news/wfw_namespace_elements/
$FSF_STRIP_COMMENTS = 0;
// Set the following to 1 and various messages will be recorded in the logfile,
// which is located in the cache dir (wp-content/cache-xml/)
$FSF_DEBUG = 0;
</pre>
<p>It has already been mentioned, but it is important to note it again: The only <strong>mandatory prerequisite</strong> is that <code>wp-content/</code> is <strong>writable by the webserver</strong>.</p>
<h4>Installation</h4>
<p>Make any changes to the configuration options within <code>fast-static-feed.php</code> and upload the file to <code>wp-content/plugins/</code> directory. Then, <strong>activate</strong> the plugin through the WordPress administration panel.</p>
<h4>License</h4>
<p><em>Fast-Static-Feed</em> is an open-source project, released as Free Software under the terms of the <a href="http://www.codetrax.org/licenses/ApacheLicenseV2">Apache License version 2</a>.</p>
<h4>Downloads, Issue Tracking, Support</h4>
<p>For the <strong>latest releases</strong> of <em>Fast-Static-Feed</em> please visit the <a href="http://www.codetrax.org/projects/wp-fast-static-feed/files">downloads</a> section of the <a href="http://www.codetrax.org/projects/wp-fast-static-feed">Fast-Static-Feed Development Portal</a>.</p>
<p>The development website also hosts an <strong>issue tracking</strong> facility, where you can submit your feature requests or report bugs, and <strong>discussion boards</strong>, where you can get first class support from the <em>community of users</em>.</p>
<h4>Donate</h4>
<p>This plugin is released as <strong>free software</strong>. Nevertheless, its development requires time and effort. A small donation, as a sign of appreciation of the effort, is welcome. Please, use the following button to visit the <em>Donations</em> page. Thanks in advance for your support!</p>
<p><a href="http://www.g-loaded.eu/about/donate" title="Donate"><img src="/images/donations_button.png" alt="Donations Button" /></a></p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/05/10/fast-static-feed-wordpress-plugin/">Fast-Static-Feed WordPress Plugin</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2008/05/08/more-feed-excerpt-wordpress-plugin/" rel="bookmark">More-Feed-Excerpt WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/04/bot-allow-content-wordpress-plugin/" rel="bookmark">Bot-Allow-Content WordPress plugin</a></li>
<li><a href="http://www.g-loaded.eu/2008/11/29/how-to-enable-wp-super-cache-in-wordpress/" rel="bookmark">How to enable WP-Super-Cache in WordPress</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/" rel="bookmark">Add-Meta-Tags WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/05/my-tags-wordpress-plugin/" rel="bookmark">My-Tags WordPress Plugin</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/05/10/fast-static-feed-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Use mod_deflate to Compress Web Content delivered by Apache</title>
		<link>http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/</link>
		<comments>http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/#comments</comments>
		<pubDate>Sat, 10 May 2008 00:09:24 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Servers]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=492</guid>
		<description><![CDATA[One of the most efficient methods to reduce the usage of bandwidth by the web server and, at the same time, increase the speed of the content delivery is to compress your web pages and, generally, all output that is returned to the clients. The compression of the web content can be done using several [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most efficient methods to reduce the usage of bandwidth by the web server and, at the same time, increase the speed of the content delivery is to <strong>compress</strong> your web pages and, generally, all output that is returned to the clients. The compression of the <strong>web content</strong> can be done using several methods. This article describes how to use the <em>mod_deflate</em> module to compress Apache&#8217;s output <em>on-the-fly</em>.<br />
<span id="more-492"></span></p>
<h4>Introducing mod_deflate</h4>
<p>Apache prepares the response that will be sent back to the client in several stages. One of those stages involves the modification or conversion of the data using <strong>output filters</strong>. <em>mod_deflate</em>, once loaded and activated, inserts such a filter, named <strong>DEFLATE</strong>, in Apache&#8217;s chain of <em>output filters</em>, which compresses all data that goes through it according to some rules the web server administator has defined. For instance, one can set the compression level, restrict the compression to particular MIME types or prevent some problematic web browsers or other HTTP clients from receiving compressed data from the server.</p>
<p><em>mod_deflate</em> also offers an input filter which can be used to decompress compressed HTTP requests, but this feature is outside of the scope of the current document.</p>
<p>Here follow some instructions on how to configure <em>mod_deflate</em>. Most of it can be found inside HTTPd&#8217;s official documentation, so you&#8217;d better read this resource as well.</p>
<p>Note that all of the following configuration directives can be inserted in Apache&#8217;s <em>main server context</em> or can be saved to a file that will be loaded from within the main server or any other <em>virtual host context</em>. If the configuration directives are inserted in the main server context, then <strong>they will be inherited by all virtual hosts</strong>.</p>
<h4>Load mod_deflate</h4>
<p><em>mod_deflate</em> can be loaded like any other Apache module:</p>
<pre class="codesnp">
LoadModule deflate_module modules/mod_deflate.so
</pre>
<p>Please note that <strong>this directive can only exist in the main server configuration</strong>.</p>
<h4>Enable Compression</h4>
<p>The compression of the data can be enabled <strong>for all data</strong> that goes through the <em>DEFLATE</em> filter or <em>selectively</em> depending on its <strong>MIME type</strong>.</p>
<p>To enable the compression <strong>for any type of content</strong>, insert the following directive:</p>
<pre class="codesnp">
 SetOutputFilter DEFLATE
</pre>
<p>Alternatively, to define which filetypes should pass through the <em>DEFLATE</em> output filter use the  <strong>AddOutputFilterByType</strong> directive. The following is an example:</p>
<pre class="codesnp">
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</pre>
<h4>Set the Compression Level</h4>
<p>Generally, the <a href="http://en.wikipedia.org/wiki/DEFLATE_(algorithm)">deflate compression algorithm</a> is fast enough, so setting the compression level to the maximum (9) will not cause any noticeable trouble, even to relatively old hardware.</p>
<pre class="codesnp">
DeflateCompressionLevel 9
</pre>
<h4>Custom Rules for problematic browsers</h4>
<p>The compression can be turned-off or be restricted to files of type <code>text/html</code> for known problematic web browsers. These are taken from the official documentation.</p>
<pre class="codesnp">
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</pre>
<h4>Keep track of the compression</h4>
<p>Finally you can keep track of the compression in order to evaluate the effectiveness of the use of <em>mod_deflate</em> in your server.</p>
<p>The following directives define some variables, such as:</p>
<ul>
<li><strong>instream</strong> : the size in bytes of the data as received by the <em>DEFLATE</em> filter.</li>
<li><strong>outstream</strong> : the size in bytes of the compressed data as returned from the <em>DEFLATE</em> filter.</li>
<li><strong>ratio</strong> : the compression ratio, <code>(Output/Input)x100</code></li>
</ul>
<pre class="codesnp">
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
</pre>
<p>Finally, you can define a custom <em>logformat</em> so to be able to record the aforementioned values to a logfile:</p>
<pre class="codesnp">
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
</pre>
<p>The deflate logformat can be used for the main server&#8217;s or for any vhost;s logfile.</p>
<h4>Effectiveness of Compression</h4>
<p>It is well known that not all document types can benefit the same from compression. Generally, the <em>deflate algorithm</em> can compress <strong>text</strong> surprisingly fast and with a very high efficiency ratio. On the other hand, it is almost useless when used to compress <strong>images</strong> which have been prepared for the web such as PNG, JPEG, GIF and generally all other image types in which the data has already been compressed. The same goes for compressed <strong>audio</strong> files, such as MP3, AAC, OGG, <strong>videos</strong>, <strong>PDF</strong> documents and all other already compressed files.</p>
<p>So, the benefits of using <em>mod_deflate</em> to reduce the bandwidth usage and speed up the content delivery are heavily dependent on the type of files your web server delivers.</p>
<h4>Browser Support</h4>
<p>A web server that sends compressed data to clients would be completely useless if the HTTP clients couldn&#8217;t decompress that data. All modern and popular web browsers support accepting content that has been compressed using the <em>gzip</em> or <em>deflate</em> algorithms, so there should be no problem at all.</p>
<h4>Appendix I</h4>
<p>Here is the complete <em>mod_deflate</em> configuration as described in this <span style="color:black;text-decoration:none;"><a href="http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/">article</a></span>. Save it in a file, named <strong>deflate.conf</strong> and import it in the main server&#8217;s configuration using the <strong>Include</strong> directive</p>
<p>(<code>Include /path/to/deflate.conf</code>):</p>
<pre class="codesnp">
#
# mod_deflate configuration
#
LoadModule deflate_module modules/mod_deflate.so
&lt;IfModule mod_deflate.c&gt;
        AddOutputFilterByType DEFLATE text/plain
        AddOutputFilterByType DEFLATE text/html
        AddOutputFilterByType DEFLATE text/xml
        AddOutputFilterByType DEFLATE text/css
        AddOutputFilterByType DEFLATE application/xml
        AddOutputFilterByType DEFLATE application/xhtml+xml
        AddOutputFilterByType DEFLATE application/rss+xml
        AddOutputFilterByType DEFLATE application/javascript
        AddOutputFilterByType DEFLATE application/x-javascript
        DeflateCompressionLevel 9
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        DeflateFilterNote Input instream
        DeflateFilterNote Output outstream
        DeflateFilterNote Ratio ratio
        LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
&lt;/IfModule&gt;
</pre>
<p>This configuration will be <strong>inherited by all virtual hosts</strong>.</p>
<p>To <strong>disable</strong> it just comment out the line that loads the mod_deflate module (<code>#LoadModule ...</code>).</p>
<p>To record <em>mod_deflate</em>&#8216;s specific variable (<em>instream</em>, <em>outstream</em>, <em>ratio</em>) values for a virtual host, just add a new log file of type <em>deflate</em>:</p>
<pre class="codesnp">
CustomLog /path/to/vhost/logs/deflate_log deflate
</pre>
<p>This will give you an idea of how efficient is the use of mod_deflate in that particular vhost.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/">Use mod_deflate to Compress Web Content delivered by Apache</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files/" rel="bookmark">Optimize and Compress CSS Files</a></li>
<li><a href="http://www.g-loaded.eu/2007/08/10/ssl-enabled-name-based-apache-virtual-hosts-with-mod_gnutls/" rel="bookmark">SSL-enabled Name-based Apache Virtual Hosts with mod_gnutls</a></li>
<li><a href="http://www.g-loaded.eu/2010/03/28/script-apache-error-report/" rel="bookmark">Script for Apache Error Report</a></li>
<li><a href="http://www.g-loaded.eu/2011/11/28/speed-up-apache-by-including-htaccess-files-into-httpd-conf/" rel="bookmark">Speed up Apache by including htaccess files into httpd.conf</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/06/check-server-http-headers-with-curl/" rel="bookmark">Check Server HTTP Headers with CURL</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>bbPress registration functions patch</title>
		<link>http://www.g-loaded.eu/2007/07/10/bbpress-registration-functions-patch/</link>
		<comments>http://www.g-loaded.eu/2007/07/10/bbpress-registration-functions-patch/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 11:25:28 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/10/bbpress-registration-functions-patch/</guid>
		<description><![CDATA[The default messages that are emailed by bbPress to newly registered users or users that have requested password recovery are quite disappointing compared to such messages that are sent by other more mature forum applications. So, here is a patch that modifies the default messages, so that they look more professional, containing some details about [...]]]></description>
			<content:encoded><![CDATA[<p>The default messages that are emailed by <a href="http://bbpress.org/">bbPress</a> to newly registered users or users that have requested password recovery are quite disappointing compared to such messages that are sent by other more mature forum applications. So, here is a patch that modifies the default messages, so that they look more professional, containing some details about the request, such as the IP address, hostname and date/time. The patch also deals with the stupid behaviour of generating 6-character long passwords by default.<br />
<span id="more-424"></span><br />
The number of password characters is raised to 8, but you can edit the patch by hand to set this number to the desired password length.</p>
<p>Copy the file to your <strong>bbPress root directory</strong>, decompress it and apply it:</p>
<pre class="console">
$ gunzip registration-functions.php.patch.gz
$ patch -p0 -b < registration-functions.php.patch
</pre>
<p>Here follows the full patch:</p>
</pre>
<pre class="codesnp">
--- bb-includes/registration-functions.php	2007-07-10 13:29:56.000000000 +0300
+++ bb-includes/registration-functions.php.new	2007-07-10 13:29:50.000000000 +0300
@@ -41,11 +41,10 @@
 	$resetkey = bb_random_pass( 15 );
 	bb_update_usermeta( $user->ID, 'newpwdkey', $resetkey );
 	if ( $user ) :
-		mail( bb_get_user_email( $user->ID ), bb_get_option('name') . ': ' . __('Password Reset'), sprintf( __("If you wanted to reset your password, you may do so by visiting the following address:
-%s
-
-If you don't want to reset your password, just ignore this email. Thanks!"), bb_get_option('uri')."bb-reset-password.php?key=".$resetkey ), 'From: ' . bb_get_option('admin_email') );
+		$message  = sprintf(__("%s,\n\nA request to reset the password for your account has been made at %s\n\nIf you wanted to reset your password, you may do so by visiting the following address:\n\n%s\n\nIf you don't want to reset your password, just ignore this email. Thanks!\n"), "$user->user_login", bb_get_option('uri'), bb_get_option('uri')."bb-reset-password.php?key=".$resetkey );
+		$message .= sprintf("\n______\n%s\n%s [%s] %s %s\n", __("Password reset request details:"), $_SERVER['REMOTE_ADDR'], gethostbyaddr($_SERVER['REMOTE_ADDR']), __("at"), date("Y-m-d\TH:i:sO"));
+		mail( bb_get_user_email( $user->ID ), bb_get_option('name') . ': ' . __('Password Reset'), $message, 'From: ' . bb_get_option('admin_email') );
 	endif;
 }
@@ -62,7 +61,7 @@
 			bb_block_current_user();
 		if ( !$user->has_cap( 'change_user_password', $user->ID ) )
 			bb_die( __('You are not allowed to change your password.') );
-		$newpass = bb_random_pass( 6 );
+		$newpass = bb_random_pass( 8 );
 		bb_update_user_password( $user->ID, $newpass );
 		bb_send_pass           ( $user->ID, $newpass );
 		bb_update_usermeta( $user->ID, 'newpwdkey', '' );
@@ -85,7 +84,7 @@
 	return $user_id;
 }
-function bb_random_pass( $length = 6) {
+function bb_random_pass( $length = 8) {
 	$number = mt_rand(1, 15);
 	$string = md5( uniqid( microtime() ) );
  	$password = substr( $string, $number, $length );
@@ -98,7 +97,8 @@
 	$user = $bbdb->get_row("SELECT * FROM $bbdb->users WHERE ID = $user");
 	if ( $user ) :
-		$message = __("Your username is: %1\$s \nYour password is: %2\$s \nYou can now log in: %3\$s \n\nEnjoy!");
+		$message = __("%1\$s,\n\nThank you for registering at %3\$s.\n\nYou may now log in at %3\$sbb-login.php using the following username and password:\n\nusername: %1\$s \npassword: %2\$s \n\nAfter logging in, you may want to visit %3\$sprofile-edit.php so you can change your password.\n");
+		$message .= sprintf("\n______\n%s\n%s [%s] %s %s\n", __("Registration request details:"), $_SERVER['REMOTE_ADDR'], gethostbyaddr($_SERVER['REMOTE_ADDR']), __("at"), date("Y-m-d\TH:i:sO"));
 		mail( bb_get_user_email( $user->ID ), bb_get_option('name') . ': ' . __('Password'),
 			sprintf( $message, "$user->user_login", "$pass", bb_get_option('uri') ),
 			'From: ' . bb_get_option('admin_email')
</pre>
<p>I hope WordPress does not mess up the backslashes.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/10/bbpress-registration-functions-patch/">bbPress registration functions patch</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2007/04/25/bbpress-for-wordpress/" rel="bookmark">bbPress for WordPress</a></li>
<li><a href="http://www.g-loaded.eu/2010/04/07/permanently-delete-posts-topics-bbpress/" rel="bookmark">Permanently remove deleted posts and topics in bbPress</a></li>
<li><a href="http://www.g-loaded.eu/2006/04/07/http-status-codes/" rel="bookmark">HTTP Status Codes</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/01/a-temp-solution-for-the-is_preview-wp-issue/" rel="bookmark">A temp solution for the is_preview WP issue</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/10/bbpress-registration-functions-patch/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Application Testing: Zero Free Space</title>
		<link>http://www.g-loaded.eu/2007/02/20/application-testing-zero-free-space/</link>
		<comments>http://www.g-loaded.eu/2007/02/20/application-testing-zero-free-space/#comments</comments>
		<pubDate>Tue, 20 Feb 2007 05:41:54 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2007/02/20/application-testing-zero-free-space/</guid>
		<description><![CDATA[I should clarify from the beginning that this is not a technical article containing any kind of debugging information - I don't have the knowledge anyway - or any other type of proof that indicates that some commonly used applications have bugs. This is just about some observations, or better an unofficial user report, of "<em>what went wrong when I run out of free space</em>".]]></description>
			<content:encoded><![CDATA[<p>I should clarify from the beginning that this is not a technical article containing any kind of debugging information &#8211; I don&#8217;t have the knowledge anyway &#8211; or any other type of proof that indicates that some commonly used applications have bugs. This is just about some observations, or better an unofficial user report, of &#8220;<em>what went wrong when I ran out of free space</em>&#8220;.<br />
<span id="more-342"></span><br />
I had written a script which recorded information to a log file the other day. I had forgotten to turn it off and the result was that my home directory became full of data, leaving zero free space. This came at a moment while I was using <a href="http://www.mozilla.org/">firefox</a> (v2.0.0.1) and <a href="http://www.gftp.org/">gftp</a> (v2.0.18) on a <a href="http://www.gnome.org/">GNOME</a> (v2.16.3) <a href="http://fedoraproject.org/">Fedora</a> 6 desktop. Of course, as soon as I realised that my home was full of data, I deleted that huge log file. In the next moments, I noticed that the things I outline below had gone wrong during this incident. I have not tried to reproduce these errors, so I haven&#8217;t filed any bugs. Feel free to do so, if you are able to reproduce them.</p>
<p>First, I do not remember being warned about running out of free space. <strong>GNOME</strong> is supposed to do this, but, in my case, either it did not raise that warning message or I was too focused on my work so I didn&#8217;t notice it. I&#8217;d bet that the latter is what actually happened.</p>
<p>Second, I have setup several profiles in <strong>firefox</strong> and I have adjusted its launcher in the GNOME menu to start the profile manager each time I want to use the browser. Firefox keeps the profile information in the <code>~/.mozilla/firefox/profiles.ini</code> file. Under the &#8220;<em>no free space</em>&#8221; conditions, something had caused the file to be re-created as a zero-size file, losing all of my profile information. Fortunately, this was the only file that was affected. My profile directories were in tact, so it was rather easy to recover from this situation by setting my profiles again with the profile manager.</p>
<p>The third observation has to do with the FTP client, <strong>gftp</strong>. As I have mentioned earlier I was also working with this client when I run out of free space. It is strange to me how some things happen sometimes, but at that moment I was adding some ftp sites to the gftp bookmarks. Well, it seems that if you happen to save your bookmarks or settings in gftp while there is no free space in the partition that holds gftp&#8217;s config files, you are LOST! All the files in <code>~/.gftp/</code> are replaced with zero-size files and all your settings and bookmarks are lost, unless you have a recent backup of them. Well, I didn&#8217;t have one and that&#8217;s why I was angry (against myself). This was fixed &#8211; but not my bookmarks :-( &#8211; by completely removing the <code>~/.gftp/</code> directory and getting it recreated when launching gftp.</p>
<p>After this incident, I kept wondering if there were more configuration files in my user account&#8217;s home that were affected. I guess it is impossible to know in advance. Time will show.</p>
<p>An application which acted absolutely professionally and actually was the one that made me realize that there was something wrong with the free space is <a href="http://www.gnome.org/projects/evolution/">Evolution</a>. It displayed proper warning messages about not being able to write the newly fetched email and news messages to the disk and, generally, the problematic situation had absolutely no effect on it. <strong>I take my hat off to Evolution</strong> (v2.8.3).</p>
<p>This incident made me think if software developers ever test how their software would behave if there is no free space available, especially if its usage involves reading/writing/appending from/to files. I would bet that other programs might have problems under such conditions too, but I guess these situations are rare. On the other hand, if it happens and the software is not designed to work well, then your personal data could be at risk. At this point, I am rather happy I was not running my password manager at that critical period of time! ;-)</p>
<p>Anyway, as I have already written earlier, <strong>I blame noone</strong>. Unfortunately, I do not have the required free time or will to reproduce those errors in a test environment, but I guess I will do this at some later time. All the above might just be wrong conclusions and something else might was the cause of the problem. I really do not know, but I felt like writing about that experience.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/02/20/application-testing-zero-free-space/">Application Testing: Zero Free Space</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2007/09/14/featured-epiphany-plugins/" rel="bookmark">Featured Epiphany Plugins</a></li>
<li><a href="http://www.g-loaded.eu/2009/05/07/descramble-passwords-from-gftp-bookmarks-using-python/" rel="bookmark">Descramble Passwords from gftp Bookmarks using Python</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/10/testing-gnome-blog-poster/" rel="bookmark">Testing gnome-blog-poster&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2006/04/05/epiphany-browser-review/" rel="bookmark">Epiphany Browser Review</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/access-gvfs-mounts-from-the-command-line/" rel="bookmark">Access gvfs mounts from the command line</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/02/20/application-testing-zero-free-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>WordPress Meta Tags plugin stable release</title>
		<link>http://www.g-loaded.eu/2007/01/31/wordpress-meta-tags-plugin-stable-release/</link>
		<comments>http://www.g-loaded.eu/2007/01/31/wordpress-meta-tags-plugin-stable-release/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 05:55:25 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2007/01/31/wordpress-meta-tags-plugin-stable-release/</guid>
		<description><![CDATA[I am glad to announce that I have released the first stable version (v1.0) of my Add-Meta-Tags plugin for WordPress.]]></description>
			<content:encoded><![CDATA[<p>I am glad to announce that I have released the first stable version (<strong>v1.0</strong>) of my <strong><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/">Add-Meta-Tags</a></strong> plugin for WordPress.<br />
<span id="more-339"></span><br />
The last of the features, which is META tag support for category archive pages, of the first development cycle of the plugin was added yesterday. All issues regarding WordPress <strong>2.1</strong>, as I have written in my <a href="http://www.g-loaded.eu/2007/01/27/wordpress-21/">previous post</a>, have been resolved and the plugin should work even with versions of wordpress as old as <strong>1.5.2</strong> (even older maybe). I still have some ideas about new features and improvements, but I guess these will be delayed as <em>I don&#8217;t have any free time</em>&trade; at the moment.</p>
<p>I would like to thank all who have provided their feedback, either positive or negative. The important thing is that, in either way, you have contributed to the deverlopment of this plugin.</p>
<p>This is by far the most popular of the <a href="http://www.g-loaded.eu/software/#wp-plugins">plugins</a> I have written so far and I have been maintaining, fixing and actively supporting it for over a year now. If you use this plugin and would like to give something back, I&#8217;d be happy to read a <strong>small review</strong> on your blogs. ;-)</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/01/31/wordpress-meta-tags-plugin-stable-release/">WordPress Meta Tags plugin stable release</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/" rel="bookmark">Add-Meta-Tags WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2007/09/27/add-meta-tags-and-wordpress-23/" rel="bookmark">Add-Meta-Tags and WordPress 2.3</a></li>
<li><a href="http://www.g-loaded.eu/2007/11/03/announcement-add-meta-tags-v15-for-wordpress/" rel="bookmark">Announcement: Add-Meta-Tags v1.5 for WordPress</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-legacy/" rel="bookmark">Add-Meta-Tags &#8211; Legacy</a></li>
<li><a href="http://www.g-loaded.eu/2008/05/09/remove-generator-meta-tag-wordpress-plugin/" rel="bookmark">Remove-Generator-Meta-Tag WordPress Plugin</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/01/31/wordpress-meta-tags-plugin-stable-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Optimize and Compress CSS Files</title>
		<link>http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files/</link>
		<comments>http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files/#comments</comments>
		<pubDate>Mon, 04 Dec 2006 21:39:02 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files/</guid>
		<description><![CDATA[Usually, when writing or modifying a CSS file, the author adds comments and excessive indentation to the code in order to preserve its readability and to simplify maintenance. Although this might be a good habit, all those extra bits stored into the CSS file increase its filesize, often resulting in unnecessary waste of bandwidth, especially if such a file is used in a production web site. Today, I decided to search for tools that can perform compression and optimization of a CSS file.]]></description>
			<content:encoded><![CDATA[<p>Usually, when writing or modifying a <abbr title="Cascading Style Sheets">CSS</abbr> file, the author adds comments and excessive indentation to the code in order to preserve its readability and to simplify maintenance. Although this might be a good habit, all those extra bits stored into the CSS file increase its filesize, often resulting in unnecessary waste of bandwidth, especially if such a file is used in a production web site. Today, I decided to search for tools that can perform <strong>compression</strong> and <strong>optimization</strong> of a CSS file.<br />
<span id="more-315"></span><br />
A command line utility, called <a href="http://csstidy.sourceforge.net/">CSSTidy</a>, seems to be one of the best out there. It&#8217;s <em>open-source</em> software, released under the GPL, and, judging by the optimization results on this web site&#8217;s CSS, I can say it does a good job. Although the source code is available for download, I used the pre-compiled Linux binary.</p>
<p>Before proceeding, make sure you have backed up your current non-optimized style-sheet. CSSTidy will not touch your original file, but taking some precautions is a good habit.</p>
<p>Launch csstidy without arguments for a rather short description of the command line switches:</p>
<pre class="console">csstidy</pre>
<p>Although it is possible to define each parameter individually, some pre-defined templates are what you will most probably use. These include: <code>low</code>|<code>high</code>|<code>highest</code>. The higher the optimization level, the smaller the CSS filesize. More on templates <a href="http://csstidy.sourceforge.net/templates.php">here</a>.</p>
<p>I tried the <code>high</code> and <code>highest</code> templates. The latter produces a style sheet that contains all code in a single line, but that file would not <a href="http://jigsaw.w3.org/css-validator/">validate</a>, so I used the <code>high</code> template:</p>
<pre class="console">csstidy style.css --template=high style.css.out</pre>
<p>The compression ratio for my file was <code>34.86%</code> which was quite satisfactory. Also, the final file validated properly.</p>
<p>CSSTidy does a good job either you want to optimize the stylesheet for readability or for filesize. On the other hand, the CLI interface does not provide enough information about each of the CLI switches. They are pretty self-explanatory, but I guess a little description for each one of them wouldn&#8217;t hurt anyone. Also, I could not make the &#8220;<code>--remove_last_;</code>&#8221; option to work.</p>
<p>The only difference I could notice in my stylesheets between the <code>high</code> and the <code>highest</code> templates was that the whole code was squeezed in a single line when <code>highest</code> was used. Probably, this template performs some more optimizations than just deleting the line-feed characters, but it seems that there was nothing else that could be optimized in my CSS file.</p>
<p>Apart from this command line utility, there are also a lot of online CSS optimizers. I didn&#8217;t have the time to try them all, but I think I can recommend the following:</p>
<ul>
<li><a href="http://www.cleancss.com/">Clean CSS</a> &#8211; this seems to be the PHP version of CSSTidy. Everything seems to work as expected and the results are the same as before.</li>
<li><a href="http://iceyboard.no-ip.org/projects/css_compressor">Icey CSS Compressor</a> &#8211; This is another web-based CSS optimizer which performs very well. By using the default settings you get a single line with highly optimized CSS code. The compression ratio is similar to CSSTidy&#8217;s. In order to separate each selector with a line-feed character, so that the final CSS validates, you can pass the optimized CSS through <code>sed</code>:
<pre class="console">sed -i 's/}/}\n/g' style.css.out</pre>
</li>
</ul>
<p>If anyone knows about any other utility I would be very glad to know about.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files/">Optimize and Compress CSS Files</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/" rel="bookmark">Use mod_deflate to Compress Web Content delivered by Apache</a></li>
<li><a href="http://www.g-loaded.eu/2007/12/01/veritar-verify-checksums-of-files-within-a-tar-archive/" rel="bookmark">VeriTAR &#8211; Verify checksums of files within a TAR archive</a></li>
<li><a href="http://www.g-loaded.eu/2008/05/03/how-to-annotate-pdf-files-in-linux-using-xournal/" rel="bookmark">How to annotate PDF files in Linux using Xournal</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/14/creative-commons-configurator-wordpress-plugin/" rel="bookmark">Creative-Commons-Configurator WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2007/07/10/wordpress-221-bugs/" rel="bookmark">WordPress 2.2.1 bugs</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Add-Meta-Tags WordPress Plugin</title>
		<link>http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/</link>
		<comments>http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 05 Jan 2006 05:08:47 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/</guid>
		<description><![CDATA[This plugin adds XHTML META tags to your WordPress blog. The addition of the META tags is fully automatic , but it also includes all those features a SEO-concerned publisher would need in order to have total control over those meta tags. The features at a glance The following list outlines how and where META [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin adds <strong>XHTML <a href="http://en.wikipedia.org/wiki/Meta_element">META tags</a></strong> to your WordPress blog. The addition of the META tags is fully automatic , but it also includes all those features a <strong><a href="http://en.wikipedia.org/wiki/SEO">SEO</a></strong>-concerned publisher would need in order to have total control over those meta tags.<br />
<span id="more-453"></span></p>
<h4>The features at a glance</h4>
<p>The following list outlines <strong>how and where META tags are added</strong> to a WordPress blog by this plugin. Please note that this list does not provide all the details you need to know about how to customize the added metatags. Its purpose is to provide a general idea of what this plugin supports. <strong>For detailed info</strong>, <em>proceed to the next section</em>.</p>
<ul>
<li><strong>Front Page</strong>
<ul>
<li>Automatically.</li>
<li>Customization is possible from the plugin&#8217;s <em>configuration panel</em>.</li>
</ul>
</li>
<li><strong>Single Posts</strong>
<ul>
<li>Automatically. (On WordPress v2.3 or newer <strong>tags</strong> are also used in addition to the post&#8217;s categories)</li>
<li>Customization of the &#8220;description&#8221; META tag:
<ul>
<li>either via <em>custom excerpt</em></li>
<li>or via <em>custom field</em> (note that this overrides the custom excerpt).</li>
</ul>
</li>
<li>Customization of the &#8220;keywords&#8221; META tag via <em>custom field</em> only.</li>
</ul>
</li>
<li><strong>Static Pages</strong>
<ul>
<li>No automatic generation of meta tags.</li>
<li>Customization is possible with <em>custom fields</em> like it can be done in posts.</li>
</ul>
</li>
<li><strong>Category Archive Pages</strong>
<ul>
<li>The <em>description of the category</em>, if set, is used for the description META tag. The name of the category is always used at the keywords metatag.</li>
</ul>
</li>
<li><strong>META Tags on all pages</strong>
<ul>
<li>It is now possible to set any other META tag, which does not require any computation, to be added to all blog pages.</li>
</ul>
</li>
</ul>
<p>Here follow all the details about how this plugin works.</p>
<h4>Features &#8211; How to use it</h4>
<p>The simplest way to use this plugin is to <strong>activate it in the WordPress administration panel and forget about it</strong>. At this basic level of usage, it <strong>automatically</strong> adds the &#8220;<em>description</em>&#8221; and &#8220;<em>keywords</em>&#8221; META tags to the <strong>front page</strong> and to <strong>single post view</strong>, which, of course, can be customized in the ways outlined below.</p>
<h5>META Tags on the Front Page</h5>
<p>By default, the blog&#8217;s <em>tagline</em> (<code>Options->General</code>) and all the used <em>categories</em> are being used <strong>automatically</strong> as description and keywords for the meta tags on the <strong>front page</strong>. These can be <em>overridden</em> by setting a custom description and keywords for the front page in the plugin&#8217;s configuration panel (<code>Options->MetaTags</code>).</p>
<p>The description and keywords defined in the plugin&#8217;s configuration panel have higher <em>priority</em> and, if any of them is set, it will be used instead of the automatically calculated respective metatag.</p>
<h5>META Tags in Single Posts</h5>
<p>In <strong>single post</strong> view, the post&#8217;s <em>excerpt</em> and its <em>categories</em> and <em>tags</em> (tags are supported in WordPress 2.3 or newer) are <strong>automatically</strong> used as description and keywords. While editing a post, it is possible to define a <strong>custom excerpt</strong>. If this excerpt is not set, then the description is <em>calculated</em> from the post itself. This calculation is based on the following:</p>
<ol>
<li>the plugin tries to use the first complete sentences of the post, if possible.</li>
<li>it also tries to keep the calculated excerpt at a length around 250 characters. As you can guess, this cannot be always achieved, so I&#8217;d say that the calculated description will be about 150-350 characters.</li>
</ol>
<p>This automatic behaviour can also be <em>overridden</em>, by adding <strong>custom fields</strong> to the post. Note that the custom fields have the <strong>higher priority</strong> and, if set, their values are used in the META tags.</p>
<p>The contents of a custom field named <code>description</code> will be used in the description META tag instead of the post&#8217;s excerpt.</p>
<p>Contrariwise, a custom field named <code>keywords</code> can contain a comma-delimited list of keywords, which will be used in the <em>keywords</em> META tag instead of the post&#8217;s categories and tags. It is still possible though to quickly include the post&#8217;s categories and tags to this list by using the words <code>%cats%</code> and <code>%tags%</code>, which are replaced by the post&#8217;s categories and tags respectively when the page is displayed in a browser.</p>
<p>For example, when the post&#8217;s categories are not enough and tags are not enough for you, you can add a custom <code>keywords</code> field to the post, and add the extra keywords you want together with <code>%cats%</code> and/or <code>%tags%</code> :</p>
<pre class="codesnp">keyword1, keyword2, %cats%, %tags%</pre>
<p>This makes it possible to adjust and optimize the post&#8217;s keywords without having to create a huge number of blog categories and tags.</p>
<h5>META Tags in Pages</h5>
<p>It is possible to add the description and keywords meta tags in WordPress <strong>Pages</strong> by assigning custom fields to each page as it was discussed previously for posts. Pages do not belong to categories in WordPress, so metatags will <em>not</em> be added automatically without using custom fields. Also, the tag <code>%cats%</code>, if used in the keyword list, will <em>not</em> be replaced by any categories.</p>
<h5>META Tags in Category Archives</h5>
<p>Finally, META tags are automatically added to <strong>category archive pages</strong>, for example when viewing all posts that belong to a specific category. In this case, if you have set a description for that category, then this description is added to a &#8220;<em>description</em>&#8221; META tag.</p>
<p>Furthermore, a &#8220;<em>keywords</em>&#8221; META tag &#8211; containing only the category&#8217;s name &#8211; is always added when viewing category archives.</p>
<h4>Installation</h4>
<p>Extract the compressed package in a temporary directory and copy the <code>add-meta-tags.php</code> file in your <code>/wp-content/plugins/</code> directory and activate the plugin in your administration panel (<code>Options->Meta Tags</code>).</p>
<p>As it has been mentioned, <strong>no configuration is required</strong> for the plugin to function. It will add meta tags automatically to the front page and to each post in single post view.</p>
<p>The administration page (<code>Options->Meta Tags</code>) contains all the information that was mentioned in the previous section, so you can access it quickly.</p>
<h4>License</h4>
<p><em>Add-Meta-Tags</em> is an open-source project, released as Free Software under the terms of the <a href="http://www.codetrax.org/licenses/ApacheLicenseV2">Apache License version 2</a>.</p>
<h4>Downloads, Issue Tracking, Support</h4>
<p>For the <strong>latest releases</strong> of <em>Add-Meta-Tags</em> please visit the <a href="http://www.codetrax.org/projects/wp-add-meta-tags/files">downloads</a> section of the <a href="http://www.codetrax.org/projects/wp-add-meta-tags">Add-Meta-Tags Development Portal</a>.</p>
<p>The development website also hosts an <strong>issue tracking</strong> facility, where you can submit your feature requests or report bugs, and <strong>discussion boards</strong>, where you can get first class support from the <em>community of users</em>.</p>
<h4>Translations</h4>
<p>Add-Meta-Tags is ready for localization.</p>
<p>Generally, the installation of the translation file involves copying the <code>mo</code> file in the <code>plugins</code> directory, where <code>add-meta-tags.php</code> exists.</p>
<p>Translation files are hosted by their authors and are distributed separately from the main plugin.</p>
<p>Currently available translations:</p>
<ul>
<li><a href="http://coliss.com/articles/blog/wordpress/plugin/769.html">Japanese Translation</a> by <em>coliss</em> &#8211; This is the translation of the 1.6 version of the plugin.</li>
</ul>
<p>A huge <em>thanks</em> to all for your work.</p>
<h4>Donate</h4>
<p>This plugin is released as <strong>free software</strong>. Nevertheless, its development requires time and effort. A small donation, as a sign of appreciation of the effort, is welcome. Please, use the following button to visit the <em>Donations</em> page. Thanks in advance for your support!</p>
<p><a href="http://www.g-loaded.eu/about/donate" title="Donate"><img src="/images/donations_button.png" alt="Donations Button" /></a></p>
<h4>Other Info</h4>
<p>This page had become the heaviest page on this web site (>120kb), so some sections have been removed to save some space and bandwidth.</p>
<p>The <strong>list of contributors</strong> has become too big for this page, so it has been moved inside the distribution package (file <code>THANKS</code>).</p>
<p>The <strong>changelog</strong> has been removed and is included inside the distribution package (file <code>ChangeLog</code>).</p>
<p>The <strong>comments</strong> can be found at the <a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-legacy/">Add-Meta-Tags Legacy</a> page.</p>
<p>Thanks for your understanding.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/">Add-Meta-Tags WordPress Plugin</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2007/01/31/wordpress-meta-tags-plugin-stable-release/" rel="bookmark">WordPress Meta Tags plugin stable release</a></li>
<li><a href="http://www.g-loaded.eu/2007/11/03/announcement-add-meta-tags-v15-for-wordpress/" rel="bookmark">Announcement: Add-Meta-Tags v1.5 for WordPress</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/05/my-tags-wordpress-plugin/" rel="bookmark">My-Tags WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-legacy/" rel="bookmark">Add-Meta-Tags &#8211; Legacy</a></li>
<li><a href="http://www.g-loaded.eu/2007/09/27/add-meta-tags-and-wordpress-23/" rel="bookmark">Add-Meta-Tags and WordPress 2.3</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

