<?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>Juozas devBlog &#187; yahoo</title>
	<atom:link href="http://dev.juokaz.com/tag/yahoo/feed" rel="self" type="application/rss+xml" />
	<link>http://dev.juokaz.com</link>
	<description>Random ideas, scripts and facts</description>
	<lastBuildDate>Mon, 22 Mar 2010 10:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Correct headers for dynamically generated content</title>
		<link>http://dev.juokaz.com/php/correct-headers-for-dynamically-generated-content</link>
		<comments>http://dev.juokaz.com/php/correct-headers-for-dynamically-generated-content#comments</comments>
		<pubDate>Sun, 15 Feb 2009 19:00:39 +0000</pubDate>
		<dc:creator>Juozas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[load time]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[uahoo]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yslow]]></category>

		<guid isPermaLink="false">http://dev.juokaz.com/?p=155</guid>
		<description><![CDATA[Static images have correct headers &#8211; Apache sends them by default. Different story is with all dynamic generating content &#8211; if you don&#8217;t send correct headers user&#8217;s browser will load it every time. It&#8217;s not always good, because generated thumbnails doesn&#8217;t change every time and should be cached in browser&#8217;s cache. If you want to [...]]]></description>
			<content:encoded><![CDATA[<p>Static images have correct headers &#8211; Apache sends them by default. Different story is with all dynamic generating content &#8211; if you don&#8217;t send correct headers user&#8217;s browser will load it every time. It&#8217;s not always good, because generated thumbnails doesn&#8217;t change every time and should be cached in browser&#8217;s cache. If you want to reduce server load and increase loading speed you definitely need to send correct headers.</p>
<p>Our task is to give browser enough information to identify content, which later can be used to decided if content has changed, and if not &#8211; say it to browser without sending content again. Bigger picture is explained <a href="http://thoughtpad.net/alan-dean/http-headers-status.jpg">here</a>, I really recommend analysing it a little bit &#8211; it gives better understanding how headers work and what they mean.</p>
<p>As you saw in <a href="http://thoughtpad.net/alan-dean/http-headers-status.jpg">headers map</a>, there are many possible headers to send, but we can focus on three of them:</p>
<ol>
<li>Etag. Unique identified for output data (maybe hash)</li>
<li>Last-Modified. Date of last data modification</li>
<li>Expires. When to expire content</li>
</ol>
<p>Constructing algorithm is pretty simple, it can be explained in pseudo-code:</p>
<pre>get request headers
   is content expired
      send content, new headers
   else is content different (Etag)
      send content, new headers
   else
      304 header, no content</pre>
<p>I&#8217;ve created <em>outputCacheHeaders(&#8230;)</em> function which (available <a href="http://dev.juokaz.com/examples/expires-etag/headers.phps">here</a>) outputs all required headers and returns true if you need to output content or false if not. All you need to do is pass modification time, live time and data (two last ones are not required). Live time says how long should cache be kept and data is used to generate Etag. Very simple!</p>
<p>After enabling correct headers sending, my websites started to feel much faster, because HTTP requests takes much less time. Also, <a href="http://developer.yahoo.com/performance/rules.html">Yahoo performance tips</a> are really worth reading, really. There are many great tips and I have been using many of them for a long time. These tricks are much much more significant than 0.1 s. faster PHP rendering time.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.juokaz.com/php/correct-headers-for-dynamically-generated-content/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>„Canonical tags“ to help with duplicated content?</title>
		<link>http://dev.juokaz.com/google/canonical-tags-to-help-with-duplicated-content</link>
		<comments>http://dev.juokaz.com/google/canonical-tags-to-help-with-duplicated-content#comments</comments>
		<pubDate>Fri, 13 Feb 2009 00:06:22 +0000</pubDate>
		<dc:creator>Juozas</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[duplicated content]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://dev.juokaz.com/?p=122</guid>
		<description><![CDATA[As searchengineland.com reports, today Google, Microsoft and Yahoo agreed on new meta tag &#8211; canonical tag.
Canonical tag is the easiest way so far to remove duplicated content which is not duplicated at all. For example, image that I have a page accessible through „http://dev.juokaz.com/page/hello.php&#8221; URL. All links below will point to same page and, if [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://searchengineland.com/canonical-tag-16537">searchengineland.com reports</a>, today Google, Microsoft and Yahoo agreed on new meta tag &#8211; <strong>canonical tag</strong>.</p>
<p>Canonical tag is the easiest way so far to remove duplicated content which is not duplicated at all. For example, image that I have a page accessible through „http://dev.juokaz.com/page/hello.php&#8221; URL. All links below will point to same page and, if they are found by Google, will be indexed in search engine:</p>
<ol>
<li> http://dev.juokaz.com/page/hello.php<em>?SID=hd9328h3298f32h9832hf329 </em></li>
<li> http://dev.juokaz.com/page/hello.php?<em>utm_medium=main&amp;utm_source=banner&amp;utm_compaign=digg </em></li>
<li> http://dev.juokaz.com/page/hello.php?<em>debug=1 </em></li>
<li>etc.</li>
</ol>
<p>As you can image, this is not good, because different links + same content = duplicated content. There are solutions to avoid it, but they require creating rules for ULRs, trying to clean-up them and them redirecting to correct ones. Today canonical tag was introduced, which allows to remove this problem very simply. All you need to do, is to add this this link to your HTML&#8217;s &lt;head&gt; node:</p>
<p>&lt;link rel=&#8221;<strong>canonical</strong>&#8221; href=&#8221;http://dev.juokaz.com/page/hello.php&#8221; /&gt;</p>
<p>That&#8217;s it! Search engines reads this information and knows, that correct version is in specified URL. All other URLs (if their page have this tag) will not be indexed or appear in search results. Even page rank will be automatically assigned to correct link. Very clever and user-friendly solution.</p>
<p>It&#8217;s still a fresh technology, so there are no real-life examples of canonical tags results, but I expect that this will work just fine and duplicated content problem will be a little bit easier to avoid. Good work Google (and others)!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.juokaz.com/google/canonical-tags-to-help-with-duplicated-content/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
