<?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>Web page &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/web-page/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>How to Collect the Images and Meta Tags from a Webpage with PHP</title>
		<link>/2011/02/25/how-to-collect-the-images-and-meta-tags-from-a-webpage-with-php/</link>
		<comments>/2011/02/25/how-to-collect-the-images-and-meta-tags-from-a-webpage-with-php/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 09:23:50 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Inc]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTML element]]></category>
		<category><![CDATA[LinkedIn Corporation]]></category>
		<category><![CDATA[Meta element]]></category>
		<category><![CDATA[Meta Tags]]></category>
		<category><![CDATA[Online social networking]]></category>
		<category><![CDATA[Search engine optimization]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[social services]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[Technical communication]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web page]]></category>
		<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">/?p=2216</guid>
		<description><![CDATA[Meta Tags and the Facebook Example You&#8217;ve definitely seen the &#8220;share a link&#8221; screen in Facebook. When you paste a link into the box (fig. 1) and press the &#8220;Attach&#8221; button you&#8217;ll get the prompted cite parsed with a title, description and possibly thumb (fig. 2). This functionality is well known in Facebook, but it &#8230; <a href="/2011/02/25/how-to-collect-the-images-and-meta-tags-from-a-webpage-with-php/" class="more-link">Continue reading <span class="screen-reader-text">How to Collect the Images and Meta Tags from a Webpage with PHP</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/04/20/how-to-sanitize-user-input-in-php/" rel="bookmark" title="How to Sanitize User Input in PHP?">How to Sanitize User Input in PHP? </a></li>
<li><a href="/2010/08/03/html-tags/" rel="bookmark" title="HTML Tags: &lt;base&gt;">HTML Tags: &lt;base&gt; </a></li>
<li><a href="/2010/09/10/automatically-upload-images-with-php-directly-from-the-uri/" rel="bookmark" title="Automatically Upload Images with PHP Directly from the URI">Automatically Upload Images with PHP Directly from the URI </a></li>
<li><a href="/2011/01/18/download-images-with-php/" rel="bookmark" title="Download Images with PHP">Download Images with PHP </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Meta Tags and the Facebook Example</h2>
<p>You&#8217;ve definitely seen the &#8220;share a link&#8221; screen in <a title="Facebook Homepage" href="http://www.facebook.com/" target="_blank">Facebook</a>. When you paste a link into the box (fig. 1) and press the &#8220;Attach&#8221; button you&#8217;ll get the prompted cite parsed with a title, description and possibly thumb (fig. 2). This functionality is well known in Facebook, but it appears to be well known also in various social services. In fact <a title="LinkedIn Homepage" href="http://www.linkedin.com/" target="_blank">Linkedin</a>, <a title="Reddit Homepage" href="http://www.reddit.com/" target="_blank">Reddit</a>, <a title="DZone Homepage" href="http://www.dzone.com/" target="_blank">Dzone</a>&#8216;s <a title="DZone Bookmarklet" href="http://www.dzone.com/links/add.html" target="_blank">bookmarklet</a> use it.</p>
<figure id="attachment_2222" style="width: 518px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2011/02/facebook_attach_prompt_screen.png"><img class="size-full wp-image-2222" title="facebook_attach_prompt_screen" src="/wp-content/uploads/2011/02/facebook_attach_prompt_screen.png" alt="Facebook Attach a Link Prompt Screen" width="518" height="155" srcset="/wp-content/uploads/2011/02/facebook_attach_prompt_screen.png 518w, /wp-content/uploads/2011/02/facebook_attach_prompt_screen-300x89.png 300w" sizes="(max-width: 518px) 100vw, 518px" /></a><figcaption class="wp-caption-text">fig. 1 - Facebook Attach a Link Prompt Screen</figcaption></figure>
<p>Fist thing to notice is that this information, prompted by Facebook, is the same as the meta tag information. However there is a slight difference.</p>
<figure id="attachment_2224" style="width: 526px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2011/02/facebook_attached_link_screen.png"><img class="size-full wp-image-2224" title="facebook_attached_link_screen" src="/wp-content/uploads/2011/02/facebook_attached_link_screen.png" alt="Facebook Attached Link Screen" width="526" height="362" srcset="/wp-content/uploads/2011/02/facebook_attached_link_screen.png 526w, /wp-content/uploads/2011/02/facebook_attached_link_screen-300x206.png 300w" sizes="(max-width: 526px) 100vw, 526px" /></a><figcaption class="wp-caption-text">fig. 2 - Facebook Attached Link Screen</figcaption></figure>
<p>Facebook prefers for the thumb the image set into the &lt;meta property=&#8221;og:image&#8221; &#8230; /&gt;. In the case above this tag appears to be:</p>
<pre lang="html4strict" escaped="true">
<meta property="og:image" content="http://b.vimeocdn.com/ts/572/975/57297584_200.jpg" />
</pre>
<p>And the image pointed in the SRC attribute is exactly the same as the one prompted by Facebook (fig. 3).</p>
<figure id="attachment_2229" style="width: 200px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2011/02/vimeo_thumb.jpg"><img class="size-full wp-image-2229" title="vimeo_thumb" src="/wp-content/uploads/2011/02/vimeo_thumb.jpg" alt="Vimeo Thumb" width="200" height="150" /></a><figcaption class="wp-caption-text">fig. 3 - Vimeo Thumb</figcaption></figure>
<p>First thing to note is that the real thumb is bigger than the thumb shown in Facebook, so Facebook resizes it and the second thing to note is that there are more meta tags of the og:&#8230; format.<span id="more-2216"></span></p>
<h2>Meta Tags and The Open Graph Protocol</h2>
<p>By default meta tags contain various information about the web page. They are not visible in the webpage, but contain some info about it. The most common meta tags are the title, description and keywords tags. They of course contain the title of the page, not that this can be different from the &lt;title&gt; tag, a short description of the page and some keywords describing the content of the page. They are well known also because the search engines make use of them when trying to collect information about the page and the process of SEO passes through it.</p>
<p>However the <a title="Default HTML Meta Tags Specification" href="http://www.w3schools.com/tags/tag_meta.asp" target="_blank">default HTML meta tags</a> cannot contain everything. Thus for example you cannot point the preferable thumbnail for a webpage. The solution is the <a title="The Open Graph Protocol Homepage" href="http://ogp.me/" target="_blank">Open Graph Protocol</a>. It comes with meta tags that can contain more and more valuable info. Such a tag is the og:image meta tag. Note that all the Open Graph (og) meta tags are defined by the og: prefix before the entity name. Thus og:image comes for images, while og:longitude for geo positioning.</p>
<p>That&#8217;s really useful, but how you can read them?</p>
<h2>PHP, Meta Tags and Regexps</h2>
<p>When you try to read information from a webpage source the first possible path is by using <a title="Regular Expressions Explained on Wikipedia" href="http://en.wikipedia.org/wiki/Regular_expression" target="_blank">regular expressions</a>. However PHP is smart enough to offer you some useful functions. Such a function is <a title="PHP get_meta_tags Function Documentation" href="http://php.net/manual/en/function.get-meta-tags.php" target="_blank">get_meta_tags()</a>. As you may guess this method reads the meta tags by given URL.</p>
<pre lang="php" escaped="true">
$a = get_meta_tags('http://vimeo.com/10758212');
var_dump($a);
</pre>
<p>However this method can&#8217;t read Open Graph tags. So finally you&#8217;ve to use some regexps.</p>
<pre lang="php" escaped="true">
preg_match('/<meta property="og:image" content="(.*?)" \/>/', $source, $matches);
</pre>
<p>Now you can grab the og:image tag. And even more &#8211; grab every image (&lt;img&gt;) from that page.</p>
<pre lang="php" escaped="true">
preg_match_all('/<img src="(.*?)"/', $source, $m);
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/04/20/how-to-sanitize-user-input-in-php/" rel="bookmark" title="How to Sanitize User Input in PHP?">How to Sanitize User Input in PHP? </a></li>
<li><a href="/2010/08/03/html-tags/" rel="bookmark" title="HTML Tags: &lt;base&gt;">HTML Tags: &lt;base&gt; </a></li>
<li><a href="/2010/09/10/automatically-upload-images-with-php-directly-from-the-uri/" rel="bookmark" title="Automatically Upload Images with PHP Directly from the URI">Automatically Upload Images with PHP Directly from the URI </a></li>
<li><a href="/2011/01/18/download-images-with-php/" rel="bookmark" title="Download Images with PHP">Download Images with PHP </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2011/02/25/how-to-collect-the-images-and-meta-tags-from-a-webpage-with-php/feed/</wfw:commentRss>
		<slash:comments>6</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>CSS sprites. Go beyond the limits with base64!</title>
		<link>/2010/02/05/css-sprites-go-beyond-the-limits-with-base64/</link>
		<comments>/2010/02/05/css-sprites-go-beyond-the-limits-with-base64/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 08:10:29 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Data URI scheme]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Minification]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[Stoyan Stefanov]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[URI scheme]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Web page]]></category>
		<category><![CDATA[web projects]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">/?p=1055</guid>
		<description><![CDATA[Why should I optimize CSS? In fact how and why should I optimize CSS is the right question. Actually CSS is simply one ore more files loaded from the server to the client, usually a browser, with CSS specific rules that must be applied by the browser to the web page you&#8217;re seeing. That&#8217;s in &#8230; <a href="/2010/02/05/css-sprites-go-beyond-the-limits-with-base64/" class="more-link">Continue reading <span class="screen-reader-text">CSS sprites. Go beyond the limits with base64!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/04/23/when-you-should-use-base64-for-images/" rel="bookmark" title="When you should use base64 for images">When you should use base64 for images </a></li>
<li><a href="/2010/01/30/optimizing-css-five-simple-steps/" rel="bookmark" title="Optimizing CSS. Five simple steps!">Optimizing CSS. Five simple steps! </a></li>
<li><a href="/2010/01/13/optimizing-the-web-start-with-the-images/" rel="bookmark" title="Optimizing the web. Start with the images!">Optimizing the web. Start with the images! </a></li>
<li><a href="/2011/01/07/more-on-css-optimization/" rel="bookmark" title="More on CSS Optimization">More on CSS Optimization </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Why should I optimize CSS?</h2>
<p>In fact how and why should I optimize CSS is the right question. Actually CSS is simply one ore more files loaded from the server to the client, usually a browser, with CSS specific rules that must be applied by the browser to the web page you&#8217;re seeing. That&#8217;s in general. Of course there are exceptions when CSS can be inline or added directly to the HTML tags, which is bad practice because thus the HTML markup becomes larger and even worse the browser cannot cache it and than load it quickly. In fact that&#8217;s why usually the CSS of a web page is put in one single file. Primary because that makes only one request to the server and in second hand because it can be cached by the browser.</p>
<p>Just because the nature of the CSS is that firstly it&#8217;s loaded and than executed one of the primary techniques of optimizing it is to make it smaller and therefore load faster. There are several methods of doing so. Enabling GZIP support of the web server and minifying the file are the most common ones. But one of the tricks you cannot optimizing just for second is using the so called CSS sprites.</p>
<h2>CSS sprites</h2>
<p>What are these? To answer this question I&#8217;ll simply try to give you an example. Let&#8217;s assume there are three CSS classes each one with its own background image. This makes four requests to the server. One for the CSS file and one per every background image. But what we&#8217;d like to achieve is to make less requests as we can. Than one of the things we can do is to make one single image and to change only the background-position CSS property to position it on the right place and to make it appear correctly.</p>
<p>Be careful! When you join all of the images into one single CSS sprite you may add one class with that background-image and every other class with only background-position property. Than every DOM element with that background must have both class names. Only than you can be sure the server will make two requests. One for the CSS file and one for the sprite.</p>
<h2>base64 to encode images</h2>
<p>In other hand most of the web projects are pretty big, and unfortunately it&#8217;s too difficult to make only one single sprite just because it&#8217;s too difficult to manage it after the project has become very large. That&#8217;s why mostly in the practice there are several sprites for the main components. But the problem is that again there are more HTTP requests.</p>
<h3>Is there any way to make only one request?</h3>
<p>Yes there is. Simply by converting your CSS sprite into a base64 encoded image. In breve base64 is an encoding where you can practically make any data into a string. Thus the image can be represented by a string containing the same information as the image. Hopefully most of the browser, except of course MSIE, does read the so called data urls, or:</p>
<blockquote>
<pre>&lt;img src="data:image/png;base64,..... " /&gt;</pre>
</blockquote>
<p>and that&#8217;s enough to get started with base64 and the single request. The sprite has become a string!</p>
<h2>CSS and base64</h2>
<p>The natural question is now how to merge all this? You now have one CSS file with one or more sprites. Than you can convert them into a base64 encoded strings and put them all into the CSS.</p>
<p>There is a problem, of course, what happens with MSIE. As I said before MSIE doesn&#8217;t read base64 encoded images. Hopefully there is a solution described very well by <a href="http://phpied.com/" target="_blank">Stoyan Stefanov</a> in his <a href="http://www.phpied.com/data-uris-mhtml-ie7-win7-vista-blues/" target="_blank">blog post here</a>.</p>
<h2>Finally &#8230;</h2>
<p>now there is only one request and everything works pretty fine. This technique can be really helpful to someone who&#8217;s trying to optimize the CSS performance to the limits.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/04/23/when-you-should-use-base64-for-images/" rel="bookmark" title="When you should use base64 for images">When you should use base64 for images </a></li>
<li><a href="/2010/01/30/optimizing-css-five-simple-steps/" rel="bookmark" title="Optimizing CSS. Five simple steps!">Optimizing CSS. Five simple steps! </a></li>
<li><a href="/2010/01/13/optimizing-the-web-start-with-the-images/" rel="bookmark" title="Optimizing the web. Start with the images!">Optimizing the web. Start with the images! </a></li>
<li><a href="/2011/01/07/more-on-css-optimization/" rel="bookmark" title="More on CSS Optimization">More on CSS Optimization </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/02/05/css-sprites-go-beyond-the-limits-with-base64/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What’s groovy in Firebug 1.5</title>
		<link>/2010/01/21/what%e2%80%99s-groovy-in-firebug-1-5/</link>
		<comments>/2010/01/21/what%e2%80%99s-groovy-in-firebug-1-5/#respond</comments>
		<pubDate>Thu, 21 Jan 2010 08:14:48 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[FTP clients]]></category>
		<category><![CDATA[Mozilla Firefox]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web page]]></category>

		<guid isPermaLink="false">/?p=917</guid>
		<description><![CDATA[Now Firebug 1.5 is out in the wild. What really impressed me is the significant difference between the last version and the really user friendly interface it gives. One of my favorite features is that you can now sort the different columns in the Net panel. Now you can clearly see what’s the biggest component &#8230; <a href="/2010/01/21/what%e2%80%99s-groovy-in-firebug-1-5/" class="more-link">Continue reading <span class="screen-reader-text">What’s groovy in Firebug 1.5</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/02/02/profiling-javascript-with-firebug-console-profile-console-time/" rel="bookmark" title="Profiling JavaScript with Firebug. console.profile() &#038; console.time()!">Profiling JavaScript with Firebug. console.profile() &#038; console.time()! </a></li>
<li><a href="/2010/02/02/firebugs-console-time-accuracy/" rel="bookmark" title="Firebug&#8217;s console.time() accuracy">Firebug&#8217;s console.time() accuracy </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/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>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Now Firebug 1.5 is out in the wild. What really impressed me is the significant difference between the last version and the really user friendly interface it gives.</p>
<p>One of my favorite features is that you can now sort the different columns in the Net panel. Now you can clearly see what’s the biggest component and what makes more traffic. This helps a lot once you decide to optimize the web page you’re watching.</p>
<p>Another good tool is that you can see the computed style, which however is only for Firefox and gives you partial information about all styles in different browsers, but it’s useful though.</p>
<p>I was pretty impressed by this version and I’d like to recommend it!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/02/02/profiling-javascript-with-firebug-console-profile-console-time/" rel="bookmark" title="Profiling JavaScript with Firebug. console.profile() &#038; console.time()!">Profiling JavaScript with Firebug. console.profile() &#038; console.time()! </a></li>
<li><a href="/2010/02/02/firebugs-console-time-accuracy/" rel="bookmark" title="Firebug&#8217;s console.time() accuracy">Firebug&#8217;s console.time() accuracy </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/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>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/21/what%e2%80%99s-groovy-in-firebug-1-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster HTML! Why not?</title>
		<link>/2010/01/12/faster-html-why-not/</link>
		<comments>/2010/01/12/faster-html-why-not/#respond</comments>
		<pubDate>Tue, 12 Jan 2010 06:08:08 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[DEFLATE]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[Gzip]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sick minded web developers]]></category>
		<category><![CDATA[Span and div]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[web browsers]]></category>
		<category><![CDATA[web developers]]></category>
		<category><![CDATA[Web page]]></category>
		<category><![CDATA[web page optimization]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">/?p=875</guid>
		<description><![CDATA[Although I’ve read so many articles about web page optimization there’s not so much about optimizing HTML. Why? Maybe because nobody things that the HTML source of a page can be optimized or the optimization of it cannot bring some benefit to the page load experience. I don’t thing so. If something can be optimized, &#8230; <a href="/2010/01/12/faster-html-why-not/" class="more-link">Continue reading <span class="screen-reader-text">Faster HTML! Why not?</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/11/html-tag-semantics-strong-vs-b/" rel="bookmark" title="HTML Tag Semantics. STRONG vs. B!">HTML Tag Semantics. STRONG vs. B! </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>
<li><a href="/2010/07/17/send-html-mails-with-zend_mail/" rel="bookmark" title="Send Html Mails with Zend_Mail">Send Html Mails with Zend_Mail </a></li>
<li><a href="/2010/08/03/html-tags/" rel="bookmark" title="HTML Tags: &lt;base&gt;">HTML Tags: &lt;base&gt; </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Although I’ve read so many articles about web page optimization there’s not so much about optimizing HTML.</p>
<h2>Why?</h2>
<p>Maybe because nobody things that the HTML source of a page can be optimized or the optimization of it cannot bring some benefit to the page load experience. I don’t thing so. If something can be optimized, even if this does not give you so much, why you shouldn’t do it?</p>
<h2>How to optimize such thing as HTML?</h2>
<p>Well there are few things you should do and other that can speed up a little bit but you should not.</p>
<h3>1. Enable gzip</h3>
<p>What is gzip? Well in breve everything the server generates is sent back to the client in text format. You’ve to possibilities to send it. Either compressed or uncompressed. As you may guess the compressed format is a lot faster than uncompressed. In fact to make it work that way you’d need to enable gzip which is supported by the web server. In the case of Apache web server this can be done by enabling mod_deflate. Take a look of mod_deflated and mod_inflate. This two modules gives you the possibility to make your site a lot faster and the good news is that this is done without a single line change. The bad news, as always there’s a bad news, is that sometimes this cannot help a visitor, simply because his browser doesn’t support such corresponding with the server. According to a research I’ve read recently almost 15% of the web browsers doesn’t support gzip. Sometimes the reason is old browser versions, sometimes because the state policy doesn’t allow it. However this is the first thing you should do to speed up your HTML even it is not related directly to HTML scripts. By the way this will speed up everything which is sent back to the client, especially CSS and JavaScript files and in the case of JavaScript this can improve dramatically the user experience.<span id="more-875"></span></p>
<h3>2. Use div elements instead of tables when possible.</h3>
<p>This is the second thing you can do to speed up your site. The simple reason to do that is because the DIV element doesn’t need so much markup as a TABLE element. When widely used in a page &#8211; imaging thousands of tables this can be a disaster. Remember the first thing is to make the text you send to the server as small as possible. In that point I should say that not only the tables to div switch is enough. Always prefer smaller tags and constructions. This is a bit difficult. Some experienced web developers can construct the same page with less HTML markup than newbies, but that depends of your level of experience.</p>
<h3>3. Make it ugly &#8211; just to spend some space.</h3>
<p>Your code is beautifully organized and when viewing the source everyone is excited! That was a mistake I used to make in my early projects. Why we thing somebody will take a look of the source code? Why we thing somebody’s using view-source option? Because we’re sick minded web developers. Nobody cares about your well organized source code. Normal users don’t look at it! Forget about beauty! As you may remember &#8211; you should spend all the extra spaces you send to the browser. Well if well organized the source code is full of tabulations, new lines and spaces. This is not good! Well if gzip is enabled they may be spent to the client, but if not? Stop writing beautiful HTML. The first task is to make it readable and maintainable.</p>
<h3>4. Don’t use inline styling</h3>
<p>This cannot be cached by the browser, is difficult to maintain and is &#8211; ugly! Yeah don’t use inline styles it makes your markup larger, which yet again is bad and is difficult to maintain. Write everything in CSS files, include them from the outside and setup only the classes you need.</p>
<h3>5. Make it maintainable</h3>
<p>Although its important to make the HTML as small as possible, sometimes that means to make it as ugly as possible and that brings the enemy number one &#8211; unmaintainable code. After a while the change of that code is technically impossible. So use all these techniques with something in mind &#8211; make it maintainable even if that will sacrifice some optimization benefits.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/11/html-tag-semantics-strong-vs-b/" rel="bookmark" title="HTML Tag Semantics. STRONG vs. B!">HTML Tag Semantics. STRONG vs. B! </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>
<li><a href="/2010/07/17/send-html-mails-with-zend_mail/" rel="bookmark" title="Send Html Mails with Zend_Mail">Send Html Mails with Zend_Mail </a></li>
<li><a href="/2010/08/03/html-tags/" rel="bookmark" title="HTML Tags: &lt;base&gt;">HTML Tags: &lt;base&gt; </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/12/faster-html-why-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What should be optimized in one web page?</title>
		<link>/2010/01/11/what-should-be-optimized-in-one-web-page/</link>
		<comments>/2010/01/11/what-should-be-optimized-in-one-web-page/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 06:29:49 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Hypertext]]></category>
		<category><![CDATA[New encyclopedism]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Program optimization]]></category>
		<category><![CDATA[Scientific revolution]]></category>
		<category><![CDATA[server site]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[web development experience]]></category>
		<category><![CDATA[Web page]]></category>
		<category><![CDATA[web project]]></category>
		<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">/?p=877</guid>
		<description><![CDATA[Well that&#8217;s a question that has been asked so many times in the web and I my intention is not to repeat that. In my web development experience after so many web sites behind my back, there is always something that repeats in every site. And that&#8217;s the technology that support the development &#8211; the &#8230; <a href="/2010/01/11/what-should-be-optimized-in-one-web-page/" class="more-link">Continue reading <span class="screen-reader-text">What should be optimized in one web page?</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/18/what-should-i-optimize-first-in-my-web-page/" rel="bookmark" title="What should I optimize first in my web page?">What should I optimize first in my web page? </a></li>
<li><a href="/2009/05/10/phpini-for-two-web-servers/" rel="bookmark" title="php.ini for two web servers">php.ini for two web servers </a></li>
<li><a href="/2010/01/13/optimizing-the-web-start-with-the-images/" rel="bookmark" title="Optimizing the web. Start with the images!">Optimizing the web. Start with the images! </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>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Well that&#8217;s a question that has been asked so many times in the web and I my intention is not to repeat that. In my web development experience after so many web sites behind my back, there is always something that repeats in every site. And that&#8217;s the technology that support the development &#8211; the languages we use. Although they differ in some way, especially those used on the server site, or so called server scripts, which can vary between many options, but in fact almost every web project consist of one of the following things:</p>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Flash or Silverlight</li>
<li>Server side scripting language, like PHP, ASP or whatever</li>
<li>Database server</li>
</ul>
<p>I&#8217;d like to add one category more and that&#8217;s the images we use in every website to construct the desirable layout. They are extremely important when optimizing a web page, because almost always they make more than half of the traffic of a page.</p>
<p>In few posts I&#8217;ll write what and how can be optimized, according to my experience and according to the articles I&#8217;ve read. I won&#8217;t mention again why the optimization is important &#8211; I&#8217;ve written already some posts about that and the web is full of articles.</p>
<p>As I can say nowadays this is the most important topic of the web development. Almost everyone&#8217;s speaking about it and I&#8217;d like to give some references in my talks, just to make it more clear and to give you some basic points from where you can start optimizing.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/18/what-should-i-optimize-first-in-my-web-page/" rel="bookmark" title="What should I optimize first in my web page?">What should I optimize first in my web page? </a></li>
<li><a href="/2009/05/10/phpini-for-two-web-servers/" rel="bookmark" title="php.ini for two web servers">php.ini for two web servers </a></li>
<li><a href="/2010/01/13/optimizing-the-web-start-with-the-images/" rel="bookmark" title="Optimizing the web. Start with the images!">Optimizing the web. Start with the images! </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>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/11/what-should-be-optimized-in-one-web-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
