<?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/"
	>

<channel>
	<title>Blog de desenvolvimento da Milfont Consulting, Client e Server-side &#187; Otimização</title>
	<atom:link href="http://www.milfont.org/tech/category/otimizacao/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.milfont.org/tech</link>
	<description>Blog da Comunidade Milfont Consulting, uma empresa especializada em desenvolvimento Web, principalmente Javascript, node.js e muito Javascript.</description>
	<lastBuildDate>Thu, 26 Jan 2012 11:30:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Minificação de Javascript com Ant Task</title>
		<link>http://www.milfont.org/tech/2008/12/16/minificacao-de-javascript-com-ant-task/</link>
		<comments>http://www.milfont.org/tech/2008/12/16/minificacao-de-javascript-com-ant-task/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 20:06:34 +0000</pubDate>
		<dc:creator>cmilfont</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Engenharia de Software]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[High Performance]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Melhores práticas]]></category>
		<category><![CDATA[Otimização]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[ant task]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[minificação]]></category>
		<category><![CDATA[minified]]></category>

		<guid isPermaLink="false">http://www.milfont.org/tech/?p=459</guid>
		<description><![CDATA[Em um post passado eu falei da importância de unir e minificar arquivos js em determinados casos e discuti &#8220;quando&#8221; fazer isso, vou mostrar &#8220;como&#8221; minificar usando o YUI Compressor com tasks do Apache Ant montados por Viktor Lieskovsky do Javaflight. Esse pequeno tutorial-guia faz parte do material dos meus cursos de Javascript e Ajax [...]]]></description>
			<content:encoded><![CDATA[<p>Em um <a href="http://www.milfont.org/tech/2008/02/10/javascript-inline-e-external/">post passado</a> eu falei da importância de unir e minificar arquivos js em determinados casos e discuti &#8220;quando&#8221; fazer isso, vou mostrar &#8220;como&#8221; minificar usando o <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a> com tasks do <a href="http://ant.apache.org/">Apache Ant</a> <a href="http://code.google.com/p/javaflight-code/">montados por Viktor Lieskovsky</a> do <a href="http://javaflight.blogspot.com/">Javaflight</a>.</p>
<p>Esse pequeno tutorial-guia faz parte do material dos meus cursos de Javascript e Ajax e serve para deixar um histórico acessível aos alunos e fácil para leitores que por ventura precisem.</p>
<p>Preparei um ambiente de execução com todas as dependências no <a href="http://www.milfont.org/tech/projetos/">projeto</a> <a href="http://code.google.com/p/remendux/">Remendux</a> onde vocês podem fazer <a href="http://code.google.com/p/remendux/source/checkout">checkout</a> e rodar o build ant localmente como um projeto do eclipse &#8211; estou usando o plugin para o <a href="http://subclipse.tigris.org/">SVN Subclipse</a>.</p>
<p>Montei um script ant padrão bem simples de ser entendido por iniciantes:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jsmin&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;main&quot;</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Propriedades para definir nomes de pastas que usaremos --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;js&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;js&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;build&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;lib&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;output&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;output&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Propriedades para definir nomes os arquivos necessários --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yui-compressor.jar&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${lib}/yuicompressor-2.4.2.jar&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yui-compressor-ant-task.jar&quot;</span> </span>
<span style="color: #009900;">		<span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${lib}/yui-compressor-ant-task-0.3.jar&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Incluir as libs necessárias no classpath --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;task.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${yui-compressor.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${yui-compressor-ant-task.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Definição da task para o Ant reconhecer --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yui-compressor&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;net.noha.tools.ant.yuicompressor.tasks.YuiCompressorTask&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;classpath</span> <span style="color: #000066;">refid</span>=<span style="color: #ff0000;">&quot;task.classpath&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/taskdef<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;output&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;output&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;main&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;clean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Tag do Ant para concatenar arquivos </span>
<span style="color: #808080; font-style: italic;">		[ http://ant.apache.org/manual/CoreTasks/concat.html] </span>
<span style="color: #808080; font-style: italic;">		os arquivos são unidos na sequência de definição </span>
<span style="color: #808080; font-style: italic;">		no fileset</span>
<span style="color: #808080; font-style: italic;">		--&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;concat</span> <span style="color: #000066;">destfile</span>=<span style="color: #ff0000;">&quot;${output}/remendux.js&quot;</span> <span style="color: #000066;">force</span>=<span style="color: #ff0000;">&quot;no&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${js}/util.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${js}/remendux.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/concat<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Task do yui-compressor --&gt;</span>
		 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;yui-compressor</span> <span style="color: #000066;">warn</span>=<span style="color: #ff0000;">&quot;false&quot;</span>  <span style="color: #000066;">munge</span>=<span style="color: #ff0000;">&quot;true&quot;</span>  </span>
<span style="color: #009900;">				<span style="color: #000066;">preserveallsemicolons</span>=<span style="color: #ff0000;">&quot;false&quot;</span> </span>
<span style="color: #009900;">				<span style="color: #000066;">fromdir</span>=<span style="color: #ff0000;">&quot;${output}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/yui-compressor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Após a importação, para executar o script &#8211; que chamei de build-yui.xml &#8211; basta apenas executar com o ant pelo eclipse &#8211; vide imagem abaixo &#8211; ou em linha de comando. Estou usando o Ant 7.1 com java 6u10 e Eclipse 3.4, portanto caso haja um erro atente para a versão das ferramentas usadas.</p>
<p><img src="http://www.milfont.org/tech/wp-content/uploads/2008/12/build.jpg" alt="" title="build"  class="aligncenter size-medium wp-image-464" /></p>
<p>Após executar, observe a redução de tamanho na versão minificada [../build/remendux-min.js] para a versão concatenada [../output/remendux.js ]. A versão final ficou com 30% do tamanho com documentação e identação.</p>

<div class="wp_syntax"><div class="code"><pre class="abap" style="font-family:monospace;">Buildfile<span style="color: #808080;">:</span> C<span style="color: #808080;">:</span>\workspace\remendux\build<span style="color: #808080;">-</span>yui<span style="color: #808080;">.</span>xml
     <span style="color: #808080;">&#91;</span>echo<span style="color: #808080;">&#93;</span> Building <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">output</span>
clean<span style="color: #808080;">:</span>
    <span style="color: #808080;">&#91;</span>mkdir<span style="color: #808080;">&#93;</span> Created dir<span style="color: #808080;">:</span> C<span style="color: #808080;">:</span>\workspace\remendux\build
    <span style="color: #808080;">&#91;</span>mkdir<span style="color: #808080;">&#93;</span> Created dir<span style="color: #808080;">:</span> C<span style="color: #808080;">:</span>\workspace\remendux\<span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">output</span>
main<span style="color: #808080;">:</span>
<span style="color: #808080;">&#91;</span>yui<span style="color: #808080;">-</span>compressor<span style="color: #808080;">&#93;</span>
 <span style="color: #808080;">&#91;</span><span style="color: #3399ff;">30</span><span style="color: #808080;">%</span><span style="color: #808080;">&#93;</span> remendux<span style="color: #808080;">.</span>js <span style="color: #808080;">&#91;</span><span style="color: #3399ff;">5775</span><span style="color: #808080;">&#93;</span> <span style="color: #808080;">---&gt;</span> <span style="color: #202020;">remendux</span><span style="color: #808080;">-</span><span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">min</span><span style="color: #808080;">.</span>js <span style="color: #808080;">&#91;</span><span style="color: #3399ff;">1734</span><span style="color: #808080;">&#93;</span>
<span style="color: #808080;">&#91;</span>yui<span style="color: #808080;">-</span>compressor<span style="color: #808080;">&#93;</span>
 <span style="color: #808080;">&#91;</span>JavaScript<span style="color: #808080;">&#93;</span> Compressed <span style="color: #3399ff;">1</span> files <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">to</span> <span style="color: #3399ff;">30</span><span style="color: #808080;">%</span> <span style="color: #808080;">&#40;</span>5KB <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">to</span> 1KB<span style="color: #808080;">,</span> saving 4KB<span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#91;</span>yui<span style="color: #808080;">-</span>compressor<span style="color: #808080;">&#93;</span>
 <span style="color: #808080;">&#91;</span>CSS<span style="color: #808080;">&#93;</span> <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">No</span> files <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">to</span> compress<span style="color: #808080;">,</span> <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">or</span> <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">all</span> files already <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">up to</span> <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">date</span>
<span style="color: #808080;">&#91;</span>yui<span style="color: #808080;">-</span>compressor<span style="color: #808080;">&#93;</span>
 Compressed <span style="color: #3399ff;">1</span> files <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">to</span> <span style="color: #3399ff;">30</span><span style="color: #808080;">%</span> <span style="color: #808080;">&#40;</span>5KB <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">to</span> 1KB<span style="color: #808080;">,</span> saving 4KB<span style="color: #808080;">&#41;</span>
BUILD SUCCESSFUL
Total <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">time</span><span style="color: #808080;">:</span> <span style="color: #3399ff;">12</span> <span style="color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;">seconds</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.milfont.org/tech/2008/12/16/minificacao-de-javascript-com-ant-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compare a velocidade dos seus sites</title>
		<link>http://www.milfont.org/tech/2008/07/19/compare-a-velocidade-dos-seus-sites/</link>
		<comments>http://www.milfont.org/tech/2008/07/19/compare-a-velocidade-dos-seus-sites/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 19:48:27 +0000</pubDate>
		<dc:creator>cmilfont</dc:creator>
				<category><![CDATA[High Performance]]></category>
		<category><![CDATA[Melhores práticas]]></category>
		<category><![CDATA[Otimização]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[Webslug]]></category>

		<guid isPermaLink="false">http://www.milfont.org/tech/2008/07/19/compare-a-velocidade-dos-seus-sites/</guid>
		<description><![CDATA[O Webslug é um serviço onde você pode comparar a velocidade de carregamento do seu site com outro qualquer, interessante para verificar dois sites hospedados no mesmo servidor e observar o carregamento afim de descobrir problemas se um sempre carregar mais rápido do que outro.]]></description>
			<content:encoded><![CDATA[<p>O <a href="http://www.webslug.info">Webslug</a> é um serviço onde você pode comparar a velocidade de carregamento do seu site com outro qualquer, interessante para verificar dois sites hospedados no mesmo servidor e observar o carregamento afim de descobrir problemas se um sempre carregar mais rápido do que outro.</p>
<p><img src="http://www.milfont.org/tech/wp-content/upload/webslug2.jpg" alt="Webslug logo" align="bottom" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.milfont.org/tech/2008/07/19/compare-a-velocidade-dos-seus-sites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Otimizando wordpress com YSlow</title>
		<link>http://www.milfont.org/tech/2007/10/10/otimizando-wordpress-com-yslow/</link>
		<comments>http://www.milfont.org/tech/2007/10/10/otimizando-wordpress-com-yslow/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 00:50:01 +0000</pubDate>
		<dc:creator>cmilfont</dc:creator>
				<category><![CDATA[Melhores práticas]]></category>
		<category><![CDATA[Otimização]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.milfont.org/tech/2007/10/10/otimizando-wordpress-com-yslow/</guid>
		<description><![CDATA[O plugin do Yahoo! para o Firefox, YSlow, que se integra ao Firebug, avalia a performance dos sites com base nas regras de performance do Yahoo! Developer Network. Essa regras são dicas valiosas para melhorar o arquivamento que os browsers fazem (cache) e transferência de dados em geral. Geralmente quando instalamos o WordPress, nos preocupamos [...]]]></description>
			<content:encoded><![CDATA[<p>O plugin do Yahoo! para o Firefox, <a href="http://developer.yahoo.com/yslow/">YSlow</a>, que se integra ao <a href="http://www.getfirebug.com/">Firebug</a>, avalia a performance dos sites com base nas <a href="http://developer.yahoo.com/performance/index.html#rules">regras de performance</a> do <a href="http://developer.yahoo.com">Yahoo! Developer Network</a>.</p>
<p>Essa <a href="http://developer.yahoo.com/performance/rules.html">regras</a> são dicas valiosas para melhorar o arquivamento que os browsers fazem (cache) e transferência de dados em geral. Geralmente quando instalamos o WordPress, nos preocupamos apenas com extensões como o wp-cache, mas otimização como compressão (gzip) passa despercebido.</p>
<p>Quando iniciei o processo de melhorar a performance da minha página inicial com base nos dados fornecidos pelo YSlow, observe na imagem abaixo que fiquei com uma nota baixíssima, D(68).</p>
<p><img src="http://www.milfont.org/tech/wp-content/upload/otimizacao1.png" alt="sem otimizacao"/></p>
<p>Eu sabia que manipular o HTTP com &#8220;Expire Header&#8221;, &#8220;Gzip&#8221;, entre outras coisas, no meu servidor, somente por meio do .htaccess. Pesquisando na web como configurar esse arquivo apropriadamente, descobri esse site <a href="http://www.askapache.com/">Askapache.com</a>, com <a href="http://www.askapache.com/htaccess/apache-speed-expires.html">artigos resolvendo</a> esses requisitos e com códigos prontos.</p>
<p>Apliquei esse conjunto de instruções no arquivo .htaccess (caso ele não exista, crie um com esse nome):</p>
<p><img src="http://www.milfont.org/tech/wp-content/upload/console.png" alt="criar htaccess"/></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Header unset ETag
FileETag None
&lt;filesmatch&gt;
SetOutputFilter DEFLATE
&lt;/filesmatch&gt;
&nbsp;
# 480 weeks
&lt;filesmatch&gt;
Header set Cache-Control &quot;max-age=290304000, public&quot;
&lt;/filesmatch&gt;
&nbsp;
# 2 DAYS
&lt;filesmatch&gt;
Header set Cache-Control &quot;max-age=172800, public, must-revalidate&quot;
&lt;/filesmatch&gt;
&nbsp;
# 2 HOURS
&lt;filesmatch&gt;
Header set Cache-Control &quot;max-age=7200, must-revalidate&quot;
&lt;/filesmatch&gt;
&nbsp;
&lt;filesmatch&gt;
Header set Cache-Control &quot;public&quot;
Header set Expires &quot;Thu, 15 Apr 2010 20:00:00 GMT&quot;
&lt;/filesmatch&gt;</pre></div></div>

<p>Logo após tirei mais um screenshot e minha nota melhorou muito, quase perfeito, agora tinha um B(89).</p>
<p><img src="http://www.milfont.org/tech/wp-content/upload/otimizacao2.png" alt="otimizado"/></p>
<p>Por fim, para resolver o problema do CDN, eu segui o próprio <a href="http://developer.yahoo.com/yslow/faq.html#faq_cdn">faq</a> do YSlow para camuflar esse requisito, não acho necessário (no meu caso) a utilização de um <a href="http://en.wikipedia.org/wiki/Content_Delivery_Network">Content Delivery Network</a>. Quem sabe se eu me tornar um problogger, maybe <img src='http://www.milfont.org/tech/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://www.milfont.org/tech/wp-content/upload/otimizacaofinal.png" alt="otimizacao final"/></p>
<p>Minha nota agora acompanha o próprio Yahoo!, existe um selinho de alta performance? No fim das contas o que vale mesmo é em quanto tempo seu site vai abrir lá no seu leitor, essas dicas não substituem um layout enxuto e bem montado.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milfont.org/tech/2007/10/10/otimizando-wordpress-com-yslow/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

