<?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>YouTube Inc &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/youtube-inc/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Check YouTube Video Existence with Zend_Gdata_YouTube</title>
		<link>/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/</link>
		<comments>/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/#respond</comments>
		<pubDate>Fri, 21 May 2010 07:43:57 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[e->]]></category>
		<category><![CDATA[Entertainment/Culture]]></category>
		<category><![CDATA[GData]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Hypertext Transfer Protocol]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[YouTube]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=1531</guid>
		<description><![CDATA[The Video Has Been Removed?! Have you ever seen the famous message on YouTube: &#8220;This video has been removed by the user.&#8221;, but what if you&#8217;re trying to grab that video via the Zend_Gdata_YouTube? That can happen when you&#8217;re reading the feed for a channel or a user&#8217;s list of videos. In the feed everything&#8217;s &#8230; <a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" class="more-link">Continue reading <span class="screen-reader-text">Check YouTube Video Existence with Zend_Gdata_YouTube</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" rel="bookmark" title="Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/01/23/youtube-and-vimeo-goes-html5-with-video-tag-usage-catch-them-up/" rel="bookmark" title="YouTube and Vimeo goes HTML5 with video tag usage! Catch them up!">YouTube and Vimeo goes HTML5 with video tag usage! Catch them up! </a></li>
<li><a href="/2011/04/07/use-fopen-to-check-file-availability/" rel="bookmark" title="Use fopen() to Check File Availability?">Use fopen() to Check File Availability? </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>The Video Has Been Removed?!</h2>
<p>Have you ever seen the famous message on <a href="http://youtube.com/">YouTube</a>: &#8220;This video has been removed by the user.&#8221;, but what if you&#8217;re trying to grab that video via the <a href="http://framework.zend.com/manual/en/zend.gdata.youtube.html" target="_blank">Zend_Gdata_YouTube</a>?</p>
<p>That can happen when you&#8217;re reading the feed for a channel or a user&#8217;s list of videos. In the feed everything&#8217;s OK &#8211; once the video is uploaded it appears into the feed. After that the user removes the video and visiting the link from the feed you&#8217;ll get the message above.</p>
<p>Actually what happens when you try to read this &#8220;video entry&#8221; within a Zend Framework&#8217;s application. There must be some way to catch this message?</p>
<h2>Trying to Catch</h2>
<p>The answer is pretty simple! Zend_Gdata_YouTube&#8217;s throwing an exception and it can be easily cached. Here&#8217;s some source code:</p>
<pre lang="php">
$apiKey = 'your_api_key';
$client = new Zend_Http_Client();
$gdata = new Zend_Gdata_YouTube($client, 'my-app', null, $apiKey);
try {
       $gdata->getVideoEntry($video_id);
} catch(Zend_Gdata_App_Exception $e) {
       echo $e->getMessage();
}
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" rel="bookmark" title="Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/01/23/youtube-and-vimeo-goes-html5-with-video-tag-usage-catch-them-up/" rel="bookmark" title="YouTube and Vimeo goes HTML5 with video tag usage! Catch them up!">YouTube and Vimeo goes HTML5 with video tag usage! Catch them up! </a></li>
<li><a href="/2011/04/07/use-fopen-to-check-file-availability/" rel="bookmark" title="Use fopen() to Check File Availability?">Use fopen() to Check File Availability? </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iterate over YouTube Channel with Zend_Gdata_YouTube</title>
		<link>/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/</link>
		<comments>/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 14:07:56 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Atom publishing protocol]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[GData]]></category>
		<category><![CDATA[Gdata services]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[YouTube Inc]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">/?p=1465</guid>
		<description><![CDATA[Read YouTube&#8217;s Feed in Zend App The task is to read the entire Gdata from a YouTube&#8217;s channel. It may sound easy, but as you may know Gdata is based on the Atom publishing protocol, and it naturally gives you only the latest few items. Of course Zend Framework has a large set of classes &#8230; <a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" class="more-link">Continue reading <span class="screen-reader-text">Iterate over YouTube Channel with Zend_Gdata_YouTube</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" rel="bookmark" title="Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/03/15/force-zend-casting-and-help-the-ide-autocompletion/" rel="bookmark" title="Force Zend Casting and Help the IDE Autocompletion">Force Zend Casting and Help the IDE Autocompletion </a></li>
<li><a href="/2010/04/26/mysql-expressions-in-zend-framework/" rel="bookmark" title="MySQL Expressions in Zend Framework">MySQL Expressions in Zend Framework </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Read YouTube&#8217;s Feed in Zend App</h2>
<p>The task is to read the entire <a title="Gdata" href="http://code.google.com/apis/gdata/" target="_blank">Gdata</a> from a YouTube&#8217;s channel. It may sound easy, but as you may know Gdata is based on the Atom publishing protocol, and it naturally gives you only the latest few items.</p>
<p>Of course <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> has a large set of classes dealing with Google&#8217;s Gdata services, one of them is the <a href="http://framework.zend.com/manual/en/zend.gdata.youtube.html" target="_blank">Zend_Gdata_YouTube</a>.</p>
<p>It gives you the power to iterate/paginate over the entire set of YouTube user&#8217;s/channel&#8217;s videos. In that example let&#8217;s assume you have a protected function doing the reading of a single portion:</p>
<pre lang="php" escaped="true">
protected function _process(Zend_Gdata_YouTube_VideoFeed $videoFeed)
{

    /* @var $entry Zend_Gdata_YouTube_VideoEntry */
    foreach ($videoFeed as $entry) {
        /* @var $published Zend_Gdata_App_Extension_Published */
        $published = $entry-&gt;getPublished();
        $thumbnails = $entry-&gt;getVideoThumbnails();

        // set date format
        $date = new Zend_Date($published-&gt;getText());

        // array
        $tags = $entry-&gt;getVideoTags();

        $data['title'] = $entry-&gt;getVideoTitle();
        $data['description'] = $entry-&gt;getVideoDescription();
        $data['date'] = $date-&gt;get('Y-MM-d hh:mm:ss');
        $data['thumb'] = @$thumbnails[3]['url'];
        $data['id'] = $entry-&gt;getVideoId();
        $data['flash_player'] = $entry-&gt;getFlashPlayerUrl();
        $data['tags'] = implode(',', $tags) . ', ' . $entry-&gt;getVideoCategory();
        // do whatever you want with the data
    }

}
</pre>
<p>The only thing left is to iterate over the &#8220;pages&#8221; of the feed. This can be done with getNextFeed() method.</p>
<pre lang="php" escaped="true">
public function readRssAction()
{
    $userId = 'some_user';
    $client = new Zend_Http_Client();
    $gdata = new Zend_Gdata_YouTube($client, 'my-app', null, $this-&gt;_apiKey);
    $videoFeed = $gdata-&gt;getUserUploads($userId);

    // save the last items
    $this-&gt;_process($videoFeed);

    try {
        while ($videoFeed = $videoFeed-&gt;getNextFeed()) {
            $this-&gt;_process($videoFeed);
        }
    } catch (Zend_Gdata_App_Exception $e) {
        echo $e-&gt;getMessage();
    }
}
</pre>
<p>You&#8217;ll get an exception when there is no more feeds to process!</p>
<p>To combine all this into a single controller and to complete the code here&#8217;s the entire source:</p>
<pre lang="php" escaped="true">
class YoutubeController extends Zend_Controller_Action
{
    protected $_apiKey = 'your_api_key_goes_here';

    protected function _process(Zend_Gdata_YouTube_VideoFeed $videoFeed)
    {

        /* @var $entry Zend_Gdata_YouTube_VideoEntry */
        foreach ($videoFeed as $entry) {
            /* @var $published Zend_Gdata_App_Extension_Published */
            $published = $entry-&gt;getPublished();
            $thumbnails = $entry-&gt;getVideoThumbnails();

            // set date format
            $date = new Zend_Date($published-&gt;getText());

            // array
            $tags = $entry-&gt;getVideoTags();

            $data['title'] = $entry-&gt;getVideoTitle();
            $data['description'] = $entry-&gt;getVideoDescription();
            $data['date'] = $date-&gt;get('Y-MM-d hh:mm:ss');
            $data['thumb'] = @$thumbnails[3]['url'];
            $data['id'] = $entry-&gt;getVideoId();
            $data['flash_player'] = $entry-&gt;getFlashPlayerUrl();
            $data['tags'] = implode(',', $tags) . ', ' . $entry-&gt;getVideoCategory();
            // do whatever you want with the data
        }
    }

    public function readRssAction()
    {
        $userId = 'some_user';
        $client = new Zend_Http_Client();
        $gdata = new Zend_Gdata_YouTube($client, 'my-app', null, $this-&gt;_apiKey);
        $videoFeed = $gdata-&gt;getUserUploads($userId);

        // save the last items
        $this-&gt;_process($videoFeed);

        try {
            while ($videoFeed = $videoFeed-&gt;getNextFeed()) {
                $this-&gt;_process($videoFeed);
            }
        } catch (Zend_Gdata_App_Exception $e) {
            echo $e-&gt;getMessage();
        }
    }
}
</pre>
<p><em><strong>Note:</strong> here you&#8217;ve to substitute the API key with the one you&#8217;ve for your development. </em></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" rel="bookmark" title="Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/03/15/force-zend-casting-and-help-the-ide-autocompletion/" rel="bookmark" title="Force Zend Casting and Help the IDE Autocompletion">Force Zend Casting and Help the IDE Autocompletion </a></li>
<li><a href="/2010/04/26/mysql-expressions-in-zend-framework/" rel="bookmark" title="MySQL Expressions in Zend Framework">MySQL Expressions in Zend Framework </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube</title>
		<link>/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/</link>
		<comments>/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 11:53:32 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Application programming interface]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[GData]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=1329</guid>
		<description><![CDATA[Zend_Gdata Zend Framework gives you the possibility to interact with Gdata services, which are provided by most of the Goolge services. You can find more on the docs page of Zend_Gdata. The basic principle is that you can connect a service with you API key, given by Google. What I&#8217;m about to show you is &#8230; <a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" class="more-link">Continue reading <span class="screen-reader-text">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2011/04/13/post-with-zend_http_client/" rel="bookmark" title="POST with Zend_Http_Client">POST with Zend_Http_Client </a></li>
<li><a href="/2010/06/28/send-authenticated-post-request-with-zend_http_client/" rel="bookmark" title="Send Authenticated POST Request with Zend_Http_Client">Send Authenticated POST Request with Zend_Http_Client </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Zend_Gdata</h2>
<p><a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> gives you the possibility to interact with <a title="gdata" href="http://code.google.com/apis/gdata/" target="_blank">Gdata</a> services, which are provided by most of the Goolge services. You can find more on the docs page of <a href="http://framework.zend.com/manual/en/zend.gdata.html" target="_blank">Zend_Gdata</a>. The basic principle is that you can connect a service with you API key, given by Google. What I&#8217;m about to show you is how do connect such a service.</p>
<p>In theory Zend_Gdata depends on <a title="Zend_Http_Client" href="http://framework.zend.com/manual/en/zend.http.html" target="_blank">Zend_Http_Client</a> and you&#8217;ve to connect it with an instance of this class.</p>
<pre lang="php">// 1. setup API key
$apiKey = 'your_api_key_here';

// 2. retrieve videos via GData Atom
$client = new Zend_Http_Client();
$gdata = new Zend_Gdata_YouTube(null, 'my-app', null, $apiKey);</pre>
<p>Note that you&#8217;ve to replace your API key in the chunk above.</p>
<p>Now once that you&#8217;ve connected the YouTube service you can iterate through the entries from the video feed.</p>
<pre lang="php">$videoFeed = $gdata->getUserUploads('username');
foreach ($videoFeed as $entry) {
    echo $entry->getTitle();
}</pre>
<p>The thing is that you can modify a bit the code above. As ZF docs says if you don&#8217;t setup a Zend_Http_Client a default with default configuration, so you can omit this and simple write:</p>
<pre lang="php">// 1. setup API key
$apiKey = 'your_api_key_here';

// 2. retrieve videos via GData Atom
$gdata = new Zend_Gdata_YouTube(null, 'my-app', null, $apiKey);</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2011/04/13/post-with-zend_http_client/" rel="bookmark" title="POST with Zend_Http_Client">POST with Zend_Http_Client </a></li>
<li><a href="/2010/06/28/send-authenticated-post-request-with-zend_http_client/" rel="bookmark" title="Send Authenticated POST Request with Zend_Http_Client">Send Authenticated POST Request with Zend_Http_Client </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Use Cookie-Free Domain and CDN for Static Content!</title>
		<link>/2010/03/12/use-cookie-free-domain-and-cdn-for-static-content/</link>
		<comments>/2010/03/12/use-cookie-free-domain-and-cdn-for-static-content/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 08:46:32 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Content delivery network]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[HTTP cookie]]></category>
		<category><![CDATA[MySQL Americas Inc.]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[server site]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[web developers]]></category>
		<category><![CDATA[Web page]]></category>
		<category><![CDATA[Yahoo! Inc.]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=1220</guid>
		<description><![CDATA[Benefits from Cookie-Free Domains Lately most of the web developers are talking more and more about optimization. One of the practices everybody&#8217;s supporting is to use cookie free domains for static content. First of all, what&#8217;s static content. That, in breve, are all images, JavaScripts and CSS. That&#8217;s everything that&#8217;s transmitted to the client with &#8230; <a href="/2010/03/12/use-cookie-free-domain-and-cdn-for-static-content/" class="more-link">Continue reading <span class="screen-reader-text">Use Cookie-Free Domain and CDN for Static Content!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/04/15/read-the-anchor-part-of-the-url-with-php/" rel="bookmark" title="Read The Anchor Part of The URL &#8230; with PHP">Read The Anchor Part of The URL &#8230; with PHP </a></li>
<li><a href="/2010/11/03/how-to-overcome-zend_cache_frontend_pages-problem-with-cookies/" rel="bookmark" title="How to Overcome Zend_Cache_Frontend_Page&#8217;s Problem with Cookies">How to Overcome Zend_Cache_Frontend_Page&#8217;s Problem with Cookies </a></li>
<li><a href="/2011/04/05/jquery-unbind/" rel="bookmark" title="jQuery.unbind()">jQuery.unbind() </a></li>
<li><a href="/2010/03/23/read-remote-file-content-type-with-zend_http_client/" rel="bookmark" title="Read Remote File Content-Type with Zend_Http_Client">Read Remote File Content-Type with Zend_Http_Client </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Benefits from Cookie-Free Domains</h2>
<p>Lately most of the web developers are talking more and more about optimization. One of the practices everybody&#8217;s supporting is to use cookie free domains for static content. First of all, what&#8217;s static content. That, in breve, are all images, JavaScripts and CSS. That&#8217;s everything that&#8217;s transmitted to the client with no change from the server at all. In a typical PHP/MySQL site everything generated on the server site is considered dynamic, while every component that&#8217;s given to the client with no change is static. That&#8217;s why they don&#8217;t need cookies in the request.</p>
<p>That&#8217;s what Yahoo! <a title="YSlow" href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a> says:</p>
<p><a href="/wp-content/uploads/2010/03/Picture-14.png"><img class="aligncenter size-full wp-image-1280" title="Use Cookie Free Domains" src="/wp-content/uploads/2010/03/Picture-14.png" alt="" width="430" height="28" srcset="/wp-content/uploads/2010/03/Picture-14.png 430w, /wp-content/uploads/2010/03/Picture-14-300x19.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p>In a short example, lets say you&#8217;ve a web page with 10 background images used by its CSS file. Here&#8217;s a good practice to combine them in one or even use base64 for them, but that&#8217;s another talk. So in that scenario you&#8217;ll send all the cookies you&#8217;ve on the site with this images, but actually they don&#8217;t profit at all from this. The question is why you should send all this data with no need? Won&#8217;t you benefit from sending it with no cookies.</p>
<p><a href="/wp-content/uploads/2010/03/Picture-13.png"><img class="aligncenter size-full wp-image-1281" title="Cookie Free Domains" src="/wp-content/uploads/2010/03/Picture-13.png" alt="" width="430" height="172" srcset="/wp-content/uploads/2010/03/Picture-13.png 430w, /wp-content/uploads/2010/03/Picture-13-300x120.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p>As it sound logical I read some articles recently describing that the benefit from putting the static content on a non-cookie domain doesn&#8217;t pays back. OK it may be strange, however every 40 ms or whatever of page load is important, aren&#8217;t they?</p>
<h2>Setup a Cookie Free Domain</h2>
<p>The problem is that if you&#8217;d like to setup a cookie free domain the things are becoming a bit harder. You&#8217;ve two options:</p>
<ol>
<li>Move all your static content on a different domain, where no cookies are set.</li>
<li>Move your static content on a different sub domain and set all the cookies to the www subdomain. (Here&#8217;s a bit tricky).</li>
</ol>
<p>All this indeed a bit tricky! So let me proceed with the next topic.</p>
<h2>Benefits from CDN</h2>
<p>A CDN or <a title="Content Delivery Network" href="http://en.wikipedia.org/wiki/Content_delivery_network" target="_blank">Content Delivery Network</a> is a term become famous with the growing web. Now big sites have servers in almost every continent and perhaps country. CDN is an abstraction of all this. The good thing is that there&#8217;s supposed to be stored static content. Think about the YouTube&#8217;s video files. Another good thing is that this domains are cookie free by default. The thing is &#8230;</p>
<h2>Why don&#8217;t You Combine Them?</h2>
<p>You&#8217;ll benefit from both ideas. Cookie free domains with CDN. In one side the web page will benefit from the closest location of the server and the CDN and in other side all this will come with no cookies to you. That&#8217;s really nice and most of the time people thing of CDN for only storing large scale data, such as video files, but no one says you cannot put your CSS, JavaScripts and background images there!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/04/15/read-the-anchor-part-of-the-url-with-php/" rel="bookmark" title="Read The Anchor Part of The URL &#8230; with PHP">Read The Anchor Part of The URL &#8230; with PHP </a></li>
<li><a href="/2010/11/03/how-to-overcome-zend_cache_frontend_pages-problem-with-cookies/" rel="bookmark" title="How to Overcome Zend_Cache_Frontend_Page&#8217;s Problem with Cookies">How to Overcome Zend_Cache_Frontend_Page&#8217;s Problem with Cookies </a></li>
<li><a href="/2011/04/05/jquery-unbind/" rel="bookmark" title="jQuery.unbind()">jQuery.unbind() </a></li>
<li><a href="/2010/03/23/read-remote-file-content-type-with-zend_http_client/" rel="bookmark" title="Read Remote File Content-Type with Zend_Http_Client">Read Remote File Content-Type with Zend_Http_Client </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/12/use-cookie-free-domain-and-cdn-for-static-content/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Video sites must use &#8230; mp4 and only mp4!</title>
		<link>/2010/03/05/video-sites-must-use-mp4-and-only-mp4/</link>
		<comments>/2010/03/05/video-sites-must-use-mp4-and-only-mp4/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 14:21:51 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Application software]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Container formats]]></category>
		<category><![CDATA[Flash Video]]></category>
		<category><![CDATA[large video site]]></category>
		<category><![CDATA[Media technology]]></category>
		<category><![CDATA[MPEG-4 Part 14]]></category>
		<category><![CDATA[Ogg]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Theora]]></category>
		<category><![CDATA[YouTube]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=1185</guid>
		<description><![CDATA[H.264 Yes it may sound strange, but now with the upcoming HTML5 features every browser again is playing its own game. Firefox and Opera support only OGG Theora, Chrome and Safari only MP4 and what about IE .. it doesn&#8217;t support anything. Than why should we convert to mp4 with h.264 codec? Because everybody is &#8230; <a href="/2010/03/05/video-sites-must-use-mp4-and-only-mp4/" class="more-link">Continue reading <span class="screen-reader-text">Video sites must use &#8230; mp4 and only mp4!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/04/does-firefox-play-mp4-h-264-within-the-html5-video-tag/" rel="bookmark" title="Does Firefox play mp4 h.264 within the HTML5 video tag?">Does Firefox play mp4 h.264 within the HTML5 video tag? </a></li>
<li><a href="/2011/01/27/few-thoughts-on-web-video/" rel="bookmark" title="Few Thoughts on Web Video">Few Thoughts on Web Video </a></li>
<li><a href="/2010/11/12/how-to-make-mp4-progressive-with-qt-faststart/" rel="bookmark" title="How to Make MP4 Progressive with qt-faststart">How to Make MP4 Progressive with qt-faststart </a></li>
<li><a href="/2010/02/26/html5-video-support-detecting-playing-and-progressive-enhancement/" rel="bookmark" title="HTML5 video support. Detecting, playing and progressive enhancement!">HTML5 video support. Detecting, playing and progressive enhancement! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>H.264</h2>
<p>Yes it may sound strange, but now with the upcoming HTML5 features every browser again is playing its own game. Firefox and Opera support only OGG Theora, Chrome and Safari only MP4 and what about IE .. it doesn&#8217;t support anything. Than why should we convert to mp4 with h.264 codec?</p>
<h2>Because everybody is playing flash</h2>
<p>And that&#8217;s again very sad but at least the flash players are playing mp4 with this encoding, which is good because this file will be playable under most of the mobiles. And if you have a large video site to support why don&#8217;t you convert to mp4 and play it with a Flash Player and give the opportunity to play mp4 on mobile.</p>
<h2>Only one file under the sky</h2>
<p>Thus you gain to keep only one file &#8211; playable under every device?</p>
<h2>YouTube and FLV</h2>
<p>Now I wonder why YouTube have both FLV and MP4 formats?</p>
<h2>Of course if you&#8217;d like to be perfect &#8230;</h2>
<p>Convert every video to MP4, FLV and OGG, but that means 3 files for every video?!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/04/does-firefox-play-mp4-h-264-within-the-html5-video-tag/" rel="bookmark" title="Does Firefox play mp4 h.264 within the HTML5 video tag?">Does Firefox play mp4 h.264 within the HTML5 video tag? </a></li>
<li><a href="/2011/01/27/few-thoughts-on-web-video/" rel="bookmark" title="Few Thoughts on Web Video">Few Thoughts on Web Video </a></li>
<li><a href="/2010/11/12/how-to-make-mp4-progressive-with-qt-faststart/" rel="bookmark" title="How to Make MP4 Progressive with qt-faststart">How to Make MP4 Progressive with qt-faststart </a></li>
<li><a href="/2010/02/26/html5-video-support-detecting-playing-and-progressive-enhancement/" rel="bookmark" title="HTML5 video support. Detecting, playing and progressive enhancement!">HTML5 video support. Detecting, playing and progressive enhancement! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/05/video-sites-must-use-mp4-and-only-mp4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Speed up the JavaScript. It can change dramatically the user experience.</title>
		<link>/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/</link>
		<comments>/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/#respond</comments>
		<pubDate>Sun, 31 Jan 2010 07:06:52 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[JavaScript library]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Minification]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[The Times Global Broadcasting Co Ltd]]></category>
		<category><![CDATA[Twitter Inc]]></category>
		<category><![CDATA[Web application]]></category>
		<category><![CDATA[web apps]]></category>
		<category><![CDATA[web developer]]></category>
		<category><![CDATA[Yahoo! Inc.]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=874</guid>
		<description><![CDATA[JavaScript in a modern web application If someone asks you what is the javascript in modern web developer, probably you should answer it’s almost the half of the traffic of your site and it’s almost everything when dealing with user experience. Today’s big web apps are useless without it AJAX/JS part. Think about Facebook, Google &#8230; <a href="/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/" class="more-link">Continue reading <span class="screen-reader-text">Speed up the JavaScript. It can change dramatically the user experience.</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2010/03/12/javascript-libraries-popularity/" rel="bookmark" title="Javascript Libraries Popularity">Javascript Libraries Popularity </a></li>
<li><a href="/2010/06/29/html5-geolocation-what-if-the-user-doesnt-share-his-position/" rel="bookmark" title="HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position?">HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position? </a></li>
<li><a href="/2010/01/14/optimizing-openlayers-make-it-smaller-and-faster/" rel="bookmark" title="Optimizing OpenLayers. Make it smaller and faster!">Optimizing OpenLayers. Make it smaller and faster! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>JavaScript in a modern web application</h2>
<p>If someone asks you what is the javascript in modern web developer, probably you should answer it’s almost the half of the traffic of your site and it’s almost everything when dealing with user experience.</p>
<p>Today’s big web apps are useless without it AJAX/JS part. Think about <a title="facebook" href="http://facebook.com/" target="_blank">Facebook</a>, <a title="google products" href="http://google.com/" target="_blank">Google products</a>, <a title="twitter" href="http://twitter.com/" target="_blank">Twitter</a>, <a title="yahoo" href="http://yahoo.com/" target="_blank">Yahoo!</a>, <a title="youtube" href="http://youtube.com/" target="_blank">Youtube</a>.</p>
<p>Actually they made this a standart. The times when you used to use JavaScript as a helper language just to figure out how a drop down menu will work are far way in the past. Now JavaScript is everything in a rich web sites. With no JS they will be no rich at all! Then it comes the question how to improve sites with lots of javascript. Actually one of the main problems in the web now is that JavaScript is blocking content.</p>
<h2>Blocked by the JavaScript</h2>
<p>What that means at all is that until the browser receives and parses the JavaScript file/s it doesn’t process anything else, it even doesn’t load any other resources. Now you can imagine how big the problem is. When it comes to large files more than 100K the user experience will be very bad!</p>
<h2>Optimize the web? What about optimizing JavaScript!</h2>
<p>If the problem is so big as I described above why should we doubt about where to start with the optimization process? But of course with the JavaScript and the natural question that rises is how this can be optimized at all?</p>
<h2>Three steps</h2>
<p>Like me, many of you may heart of some techniques that improve javascript performance. Here are some I was able to select as important:</p>
<h3>1. minify/compress</h3>
<blockquote><p>That’s rule number one. If everything that is a JavaScript file is processed once it arrives to the client than make it smaller and make it go faster trough the wire. Actually one technique to speed up things more is to concatenated all the files you have into one single big file. Although this will not spend you some space will reduce the HTTP requests and therefore speed up the loading process.  Good tools that you can use to minify javascript files are the Yahoo’s YUI Compressor, that beside that compresses CSS and Google Closure Compiler. Both are extremely useful and by the last measurements the Google’s Compiler is even better, but it’s up to you to decide which one to pick up.</p></blockquote>
<h3>2 .write fast and smart code</h3>
<blockquote><p>You can minify everything that’s JavaScript and the code may remain slow. But why is that? That’s because the JavaScript is written in a bad way. You know there are many resources in the web describing what is a bad and what is a good practice when writing JS. Even more you can measure it by yourself if you’d like to use the Firebug’s profiler. That’s a good start to avoid bad practices.</p></blockquote>
<h3>3. improve loading &#8211; lazy loading</h3>
<blockquote><p>That’s a bit more complicated. If there’s a really big javascript file after compressing and concatenating all the JS functionality remains big. How to avoid that? Simply let’s the user to see the most important functionality and than load the entire app. Some good tutorials about lazy loading again can be found online. Don’t hesitate to search about.</p></blockquote>
<p>Beside this really basic advices I’ll continue to write in my blog about specific techniques how to improve the JavaScript as this is one of the most interesting parts of web development by me.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2010/03/12/javascript-libraries-popularity/" rel="bookmark" title="Javascript Libraries Popularity">Javascript Libraries Popularity </a></li>
<li><a href="/2010/06/29/html5-geolocation-what-if-the-user-doesnt-share-his-position/" rel="bookmark" title="HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position?">HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position? </a></li>
<li><a href="/2010/01/14/optimizing-openlayers-make-it-smaller-and-faster/" rel="bookmark" title="Optimizing OpenLayers. Make it smaller and faster!">Optimizing OpenLayers. Make it smaller and faster! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube and Vimeo goes HTML5 with video tag usage! Catch them up!</title>
		<link>/2010/01/23/youtube-and-vimeo-goes-html5-with-video-tag-usage-catch-them-up/</link>
		<comments>/2010/01/23/youtube-and-vimeo-goes-html5-with-video-tag-usage-catch-them-up/#respond</comments>
		<pubDate>Sat, 23 Jan 2010 07:00:33 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Bart Allen]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Video hosting]]></category>
		<category><![CDATA[Vimeo]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[web developers]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[YouTube]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=936</guid>
		<description><![CDATA[What better example than that coming both from YouTube and Vimeo. Although video tag is not supported except under Safari and Chrome, that&#8217;s the future everyone&#8217;s going to embed sooner or later. And if these &#8220;big players&#8221; are going that way, don&#8217;t hesitate to follow them! HTML5 is really what we as web developers were &#8230; <a href="/2010/01/23/youtube-and-vimeo-goes-html5-with-video-tag-usage-catch-them-up/" class="more-link">Continue reading <span class="screen-reader-text">YouTube and Vimeo goes HTML5 with video tag usage! Catch them up!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/03/04/does-firefox-play-mp4-h-264-within-the-html5-video-tag/" rel="bookmark" title="Does Firefox play mp4 h.264 within the HTML5 video tag?">Does Firefox play mp4 h.264 within the HTML5 video tag? </a></li>
<li><a href="/2010/02/26/html5-video-support-detecting-playing-and-progressive-enhancement/" rel="bookmark" title="HTML5 video support. Detecting, playing and progressive enhancement!">HTML5 video support. Detecting, playing and progressive enhancement! </a></li>
<li><a href="/2010/03/05/video-sites-must-use-mp4-and-only-mp4/" rel="bookmark" title="Video sites must use &#8230; mp4 and only mp4!">Video sites must use &#8230; mp4 and only mp4! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>What better example than that coming both from YouTube and Vimeo. Although video tag is not supported except under Safari and Chrome, that&#8217;s the future everyone&#8217;s going to embed sooner or later.</p>
<p>And if these &#8220;big players&#8221; are going that way, don&#8217;t hesitate to follow them! HTML5 is really what we as web developers were waiting for so long and even all of the problems during its standardization process it&#8217;s really cool there will be tags like video.</p>
<p>What YouTube is doing today, perhaps will seem normal to everyone tomorrow. However there are some questions still with no answer, as where the flash possibility to add ads into the player is going?! But we&#8217;re about to see great things from these two sites!</p>
<p>Just check out these two links:</p>
<p><a title="YouTube HTML5" href="http://www.youtube.com/html5" target="_blank">Youtube HTML5</a></p>
<p><a title="Vimeo HTML5" href="http://news.cnet.com/8301-27076_3-10439048-248.html" target="_blank">Vimeo</a></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/03/04/does-firefox-play-mp4-h-264-within-the-html5-video-tag/" rel="bookmark" title="Does Firefox play mp4 h.264 within the HTML5 video tag?">Does Firefox play mp4 h.264 within the HTML5 video tag? </a></li>
<li><a href="/2010/02/26/html5-video-support-detecting-playing-and-progressive-enhancement/" rel="bookmark" title="HTML5 video support. Detecting, playing and progressive enhancement!">HTML5 video support. Detecting, playing and progressive enhancement! </a></li>
<li><a href="/2010/03/05/video-sites-must-use-mp4-and-only-mp4/" rel="bookmark" title="Video sites must use &#8230; mp4 and only mp4!">Video sites must use &#8230; mp4 and only mp4! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/23/youtube-and-vimeo-goes-html5-with-video-tag-usage-catch-them-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
